/* RCS */ void RCS() { /* Define our OLD PUNCH Vector */ Vector LocalPlayer_oldVectorPunch; /* Start infinity loop */ /* for(;;) has the same effect of while(true) */ for (;;) { /* If RCS_activation is TRUE */ if (RCS_activation) { /* Read Engine base */ DWORD Engine_dwBase = MManager.Read<DWORD>(Engine.dwBase + EnginePointer); /* Read Local Player base */ DWORD LocalPlayer_dwBase = MManager.Read<DWORD>(Client.dwBase + LocalPlayer); /* Read life state */ bool LocalPlayer_lifeState = MManager.Read<bool>(LocalPlayer_dwBase + 0x25B); /* Read if the player is in-game */ int LocalPlayer_isConnected = MManager.Read<int>(Engine_dwBase + 0x100); /* Read shots fired */ int LocalPlayer_shotsFired = MManager.Read<int>(LocalPlayer_dwBase + 0xBEB0); /* Check if the player is alive and is connected */ if (!LocalPlayer_lifeState && LocalPlayer_isConnected == 6) { /* Read the weapon punch */ /* Vector = 3 floats = x , y , z */ /* Definition on MManager.h */ /* USAGE OF A VECTOR -> LocalPlayer_vectorPunch.x OR LocalPlayer_vectorPunch.y OR LocalPlayer_vectorPunch.z */ Vector LocalPlayer_vectorPunch = MManager.Read<Vector>(LocalPlayer_dwBase + VectorPunch); /* Take the vector punch and multiply by 2 to get the perfect spot on shots */ /* Why 2? Because if we just subtract it will restore to the old position only */ /* Using LocalPlayer_vectorPunch.x *= 2.0f have the SAME effect as this LocalPlayer_vectorPunch.x = LocalPlayer_vectorPunch.x * 2.0f;*/ /* Vector Z will be ALWAYS 0 due its just a X and Y spot/"graph" */ /* Here the Punch will be controled by the X and Y using Minimum and Maximum control */ random_device Random; mt19937 RandomGen(Random()); uniform_real<float>RandomXdistrib(1.6f, 1.8f); uniform_real<float>RandomYdistrib(1.6f, 1.8f); LocalPlayer_vectorPunch.x *= RandomXdistrib(RandomGen); LocalPlayer_vectorPunch.y *= RandomYdistrib(RandomGen); LocalPlayer_vectorPunch.z = 0.0f; /* Normalize the angles to prevent untrusted */ /* Function included in MManager.h */ LocalPlayer_vectorPunch = MManager.NormalizeAngles(LocalPlayer_vectorPunch); /* Check if the player is shooting */ if (LocalPlayer_shotsFired > 2) { /* Get our current view angle */ Vector LocalPlayer_viewAngle = MManager.Read<Vector>(Engine_dwBase + ViewAngle); /* Define a new vector to modifie the angles */ Vector LocalPlayer_modifiedAngle = LocalPlayer_vectorPunch; /* Subtract the Old punch from our new punch */ LocalPlayer_modifiedAngle.x -= LocalPlayer_oldVectorPunch.x; LocalPlayer_modifiedAngle.y -= LocalPlayer_oldVectorPunch.y; LocalPlayer_modifiedAngle.z = 0.0f; /* Normalize the angles to prevent untrusted */ /* Function included in MManager.h */ LocalPlayer_modifiedAngle = MManager.NormalizeAngles(LocalPlayer_modifiedAngle); /* Subtract our new punch result from our view angle */ LocalPlayer_viewAngle.x -= LocalPlayer_modifiedAngle.x; LocalPlayer_viewAngle.y -= LocalPlayer_modifiedAngle.y; LocalPlayer_viewAngle.z = 0.0f; /* Normalize the angles to prevent untrusted */ /* Function included in MManager.h */ LocalPlayer_viewAngle = MManager.NormalizeAngles(LocalPlayer_viewAngle); /* Set the new View Angle to the player */ MManager.Write<Vector>(Engine_dwBase + ViewAngle, LocalPlayer_viewAngle); } /* Store our new punch on old punch */ LocalPlayer_oldVectorPunch = LocalPlayer_vectorPunch; } } /* Sleep to don't burn memory for nothing */ Sleep(1); } }