Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bo1 PS3 Pastebin
- //here is my patches to the game
- RemoveThreadIDCheckOnCL_ConsolePrint();
- HookFunctionStart(0x465368, *(uint32_t*)Menu_PaintAll_Hook, *(uint32_t*)Menu_PaintAll_Stub);
- HookFunctionStart(0x1B74F4, *(uint32_t*)CL_WritePacket_Hook, *(uint32_t*)CL_WritePacket_Stub);
- //HookFunction(0x2D6140, *(uint32_t*)ClientCommand_Hook);//SC58 end game protection
- HookFunctionStart(0x2D6140, *(uint32_t*)ClientCommand_Hook, *(uint32_t*)ClientCommand_Stub);//Jo-Milk command protection
- HookFunctionStart(0x16B7C8, *(uint32_t*)CG_ProcessSnapshots_hook, *(uint32_t*)CG_ProcessSnapshots_Stub);
- HookFunctionStart(0xF8160, *(uint32_t*)CG_DrawCrosshair_Hook, *(uint32_t*)CG_DrawCrosshair_Stub);//good non-host hook
- HookFunctionStart(0x3CCAF8, *(uint32_t*)MSG_WriteReliableCommand_Hook, *(uint32_t*)MSG_WriteReliableCommand_HookStub);//non-host callvote exploit you probably can do more
- void RemoveThreadIDCheckOnCL_ConsolePrint()//allows iPrintln_GameMessage and iPrintlnBold_GameMessage by noping Com_GetParseThreadInfo in 0x001AF228 CL_ConsolePrint
- {
- uint32_t PPC[] = { 0x60000000 };
- for (int i = 0; i < 0x4; i++)
- sys_dbg_write_process_memory(0x1AF264 + (i * 4), &PPC[0], 4);
- }
- void RemoveCheatProtection()//can use some cheat protected dvars
- {
- uint32_t PPC[] = { 0x60000000, 0x3B200000 };
- sys_dbg_write_process_memory(0x4C8EC4, &PPC[0], 4);
- sys_dbg_write_process_memory(0x4C8ED0, &PPC[0], 4);
- sys_dbg_write_process_memory(0x4C8ED4, &PPC[1], 4);
- //TEST
- sys_dbg_write_process_memory(0x3E013C, &PPC[0], 4);
- }
- void RSAPatch()
- {
- uint32_t PPC[] = { 0x60000000 };
- sys_dbg_write_process_memory(0x230258, &PPC[0], 4);
- sys_dbg_write_process_memory(0x23025C, &PPC[0], 4);
- sys_dbg_write_process_memory(0x230260, &PPC[0], 4);
- sys_dbg_write_process_memory(0x230264, &PPC[0], 4);
- sys_dbg_write_process_memory(0x230268, &PPC[0], 4);
- }
- //aimbot
- void thread(uint64_t)
- {
- for(;;)
- {
- if (Dvar_GetBool("cl_ingame"))
- {
- if(!LookforFFA)
- {
- isFFA = isFFAType();
- LookforFFA = true;
- }
- if(isFPSMenuOpen)
- isFPSMenuOpen = false;
- if (!isMenuOpen)
- {
- if(Aimbot)//aimbot
- {
- if (Pressed(Btn::L1) || Pressed(Btn::R1) && Pressed(Btn::L1))
- {
- if(AImbotSetAngle == 1)
- {
- if(centity[target].pos.trBase != centity[target].NewOrigin)
- {
- ApplyPrediction(them, target, (float)0.20f);
- }
- vec3_t vecangles = (them - self);
- vectoangles((float*)&vecangles);
- Angles.x = (angleseeeee[0] - clientActive->deltaAngles.x);
- Angles.y = (angleseeeee[1] - clientActive->deltaAngles.y);
- Angles.z = 0;
- CL_SetViewAngles(0,(float*)&Angles);
- AImbotSetAngle = 2;
- sleep(250);
- }
- }
- }
- }
- else
- {
- //if menu not closed do stuff here
- }
- }
- else//if not in game reset my globale variables
- {
- LookforFFA = false;
- Aimbot = false;
- if(isMenuOpen)
- isMenuOpen = false;
- }
- sleep(10);
- }
- }
- else
- sys_ppu_thread_exit(0);
- }
- // My aimbot hook
- void DoAimbot()
- {
- if(AImbotSetAngle == 0)
- {
- //vec3_t angles;
- UpdateValues();
- target = GetSuitableTarget();
- if (target == -1)
- {
- return;
- }
- else
- {
- AimTarget_GetTagPos(0,(0x377e3a08 + (clientNum * 0x31C)),tag_eye,(float*)&self);
- AimTarget_GetTagPos(0,(0x377e3a08 + (target * 0x31C)),aimat,(float*)&them);
- AImbotSetAngle = 1;
- }
- }
- }
- //
- int CG_ProcessSnapshots_hook(int localClientNum)
- {
- if (Dvar_GetBool(Dvar_cl_ingame))
- {
- if(Aimbot)
- {
- if (Pressed(Btn::L1) || Pressed(Btn::R1) && Pressed(Btn::L1))
- {
- DoAimbot();
- }
- }
- }
- return CG_ProcessSnapshots_Stub(localClientNum);
- }
- // this needs to be placed before do aimbot to be defined
- bool IsVisible(vec3_t start, vec3_t end, int skipNumber)
- {
- trace_t tr;
- CG_LocationalTrace(&tr, (float*)&start, (float*)&end,skipNumber, 0x803003,0, 0);
- return (tr.fraction != 1.0f);
- }
- int GetSuitableTarget()
- {
- int bestTarget = -1;
- float min = 0x7fffffff;
- vec3_t them_tmp;
- AimTarget_GetTagPos(0,(0x377e3a08 + (clientNum * 0x31C)),tag_eye,(float*)&self);
- for (int i = 0; i < 18; i++)
- {
- clientInfo_t* client = &cg->clientInfo[i];
- if (client->clientNum == clientNum || !client->infoValid || !strcmp(client->name, "democlient") || client->team == 3 || !isAlive(client->clientNum))
- continue;
- else if(!isFFA)
- {
- if(client->team == team)
- continue;
- }
- AimTarget_GetTagPos(0,(0x377e3a08 + (i * 0x31C)),aimat,(float*)&them_tmp);
- bool notVisible = IsVisible(self, them, clientNum);
- if (notVisible)
- {
- if (autoWall)
- {
- if (!CanKillPlayer(i,self,them_tmp))//autowall needs to patch the FX to be slightly better
- {
- continue;
- }
- }
- else
- {
- continue;
- }
- }
- float distance = sqrtf((them_tmp.x - self.x) * (them_tmp.x - self.x) + (them_tmp.y - self.y) * (them_tmp.y - self.y) + (them_tmp.z - self.z) * (them_tmp.z - self.z));
- if (distance < min)
- {
- min = distance;
- bestTarget = i;
- }
- }
- return bestTarget;
- }
- bool CanKillPlayer(int EntityNum, vec3_t bonePosStart,vec3_t bonePosend)
- {
- int localclient = *(int*)(*(int*)(0xC3DFB8));
- BulletFireParams bp;
- BulletTraceResults br;
- bp.MaxEntNum = 1022;
- bp.ignoreEntIndex = localclient;
- bp.damageMultiplier = 1.0f;
- bp.methodOfDeath = 1;
- bp.origStart = bonePosStart;
- bp.start = bonePosStart;
- bp.end = bonePosend;
- vec3_t subs = bonePosend - bonePosStart;
- vectoangles((float*)&subs);
- subs.x = angleseeeee[0];
- subs.y = angleseeeee[1];
- subs.z = angleseeeee[2];
- angleVectors(subs, &bp.dir, NULL, NULL);
- FireBulletPenetrate(0, &bp, cg->ps.weapon, ¢ity[localclient], (float*)&bonePosStart, 0, 1, &br);/*patch must be applied to this fonction to avoid FX*/
- return (EntityNum == bp.ignoreEntIndex);
- }
- void UpdateValues()
- {
- clientNum = cg->clientNum;
- team = cg->clientInfo[clientNum].team;
- }
- void ApplyPrediction(vec3_t& position, int i, float flMultiplier) {
- vec3_t vVelocity;
- VectorSubtract(centity[i].pos.trBase, centity[i].NewOrigin, vVelocity);
- vVelocity.x *= flMultiplier;
- vVelocity.y *= flMultiplier;
- vVelocity.z *= flMultiplier;
- VectorAdd(position, vVelocity, position);
- }
- //Function you might need
- struct opd_s
- {
- int32_t sub;
- int32_t toc;
- };
- opd_s va_t = { 0x4DB3D8, TOC };
- char *(*va)(const char *format, ...) = (char *(*)(const char *, ...))&va_t;
- opd_s DB_FindXAssetHeader_t = { 0x2601A0, TOC };
- XAssetHeader *(*DB_FindXAssetHeader)(XAssetHeader *header, XAssetType type, const char *name, bool errorIfMissing, int waitTime) = (XAssetHeader *(*)(XAssetHeader *, XAssetType, const char *, bool ,int))&DB_FindXAssetHeader_t;
- opd_s DB_LinkXAssetEntry_t = { 0x25EE38, TOC };
- XAssetEntryPoolEntry*(*DB_LinkXAssetEntry)(XAssetEntry *newEntry, int allowOverride) = (XAssetEntryPoolEntry*(*)(XAssetEntry *, int))&DB_LinkXAssetEntry_t;
- opd_s Dvar_FindVar_t = { 0x4C55A0, TOC };
- dvar_s*(*Dvar_FindVar)(const char *name) = (dvar_s*(*)(const char *))&Dvar_FindVar_t;
- opd_s Scr_ExecThread_t = { 0x5DD580, TOC };
- unsigned short(*Scr_ExecThread)(scriptInstance_t inst, int handle, int paramcount) = (unsigned short(*)(scriptInstance_t , int, int))&Scr_ExecThread_t;
- opd_s Scr_FreeThread_t = { 0x5CB2C0, TOC };
- void(*Scr_FreeThread)(unsigned short handle, scriptInstance_t inst) = (void(*)(unsigned short, scriptInstance_t))&Scr_FreeThread_t;
- opd_s Scr_GetMethod_t = { 0x315BA8, TOC };
- popd32(*Scr_GetMethod)(const char **pName, int *type) = (popd32(*)(const char **, int *))&Scr_GetMethod_t;
- opd_s Scr_GetFunction_t = { 0x310FD8, TOC };
- popd32(*Scr_GetFunction)(const char **pName, int *type) = (popd32(*)(const char **, int *))&Scr_GetFunction_t;
- opd_s Scr_GetChecksum_t = { 0x5BA818, TOC };
- void(*Scr_GetChecksum)(scrChecksum_t *vmChecksum, scriptInstance_t inst) = (void(*)(scrChecksum_t *, scriptInstance_t ))&Scr_GetChecksum_t;
- opd_s G_Damage_t = { 0x2D8038, TOC };
- int(*G_Damage)(int targ, int inflictor, int attacker, float *Dir, float *point, int damage, int dFlag, int mod, int weapon, hitLocation_t hitLocation, unsigned int modelIndex, unsigned int partName, int timeOffset) = (int(*)(int, int, int, float*, float*, int, int, int, int, hitLocation_t, unsigned int, unsigned int, int))&G_Damage_t;
- opd_s webyte_J = { 0x375548, TOC };
- int(*G_GetWeaponIndexForName)(const char* weapon) = (int(*)(const char*))&webyte_J;
- opd_s JM_cellSpursLFQueuePushBody_t = { 0x8C7080, TOC };
- int(*JM_cellSpursLFQueuePushBody)(CellSpursLFQueue *lfqueue, const void *buffer, unsigned int isBlocking) = (int(*)(CellSpursLFQueue *, const void *, unsigned int))&JM_cellSpursLFQueuePushBody_t;
- opd_s Scr_GetFunctionHandle_t = { 0x5A92A0, TOC };
- int(*Scr_GetFunctionHandle)(scriptInstance_t inst, const char *scriptName, const char *functionName) = (int(*)(scriptInstance_t, const char *, const char *))&Scr_GetFunctionHandle_t;
- opd_s Scr_GetNumParam_t = { 0x5CB210, TOC };
- int(*Scr_GetNumParam)(int scriptInstance) = (int(*)(int))&Scr_GetNumParam_t;
- opd_s Scr_GetString_t = { 0x5D0D68, TOC };
- char*(*Scr_GetString)(unsigned int index, scriptInstance_t scriptInstance) = (char*(*)(unsigned int, scriptInstance_t))&Scr_GetString_t;
- opd_s Scr_GetInt_t = { 0x5D16C0, TOC };
- int(*Scr_GetInt)(unsigned int index, scriptInstance_t scriptInstance) = (int(*)(unsigned int, scriptInstance_t))&Scr_GetInt_t;
- opd_s Scr_LoadGameType_t = { 0x315728, TOC };
- void(*Scr_LoadGameType)(void) = (void(*)(void))&Scr_LoadGameType_t;
- opd_s Scr_LoadScript_t = { 0x5A9068, TOC };
- void(*Scr_LoadScript)(scriptInstance_t inst, const char *scriptName) = (void(*)(scriptInstance_t, const char *))&Scr_LoadScript_t;
- opd_s Scr_LoadScriptInternal_t = { 0x5A8D38, TOC };
- void(*Scr_LoadScriptInternal)(scriptInstance_t inst, const char *scriptName) = (void(*)(scriptInstance_t, const char *))&Scr_LoadScriptInternal_t;
- opd_s Dvar_GetBool_t = { 0x4C7BF0, TOC };
- bool(*Dvar_GetBool)(const char *) = (bool(*)(const char *))&Dvar_GetBool_t;
- opd_s Dvar_SetFromStringByName_t = { 0x4CF160, TOC };
- void(*Dvar_SetFromStringByName)(const char *dvarName, const char *value) = (void(*)(const char *, const char *))&Dvar_SetFromStringByName_t;
- opd_s Scr_GetSelf_t = { 0x5BA4F0, TOC };
- int(*Scr_GetSelf)(scriptInstance_t inst,int value) = (int(*)(scriptInstance_t,int))&Scr_GetSelf_t;
- opd_s SL_ConvertToString_t = { 0x5B6D10, TOC };
- const char*(*SL_ConvertToString)(int stringValue, scriptInstance_t inst) = (const char*(*)(int, scriptInstance_t))&SL_ConvertToString_t;
- opd_s Session_IsHost_t = { 0x698490, TOC };
- bool(*Session_IsHost)(SessionData_s *session, const int clientNum) = (bool(*)(SessionData_s *, const int))&Session_IsHost_t;
- opd_s CG_GetClientNum_t = { 0x116A60, TOC };
- int(*CG_GetClientNum)(int localClientNum) = (int(*)(int))&CG_GetClientNum_t;
- opd_s cb1 = { 0x399CC8, TOC };
- void(*Cbuf)(int client, char* cmd) = (void(*)(int, char*))&cb1;
- opd_s SV_GameSendServerCommand_t = { 0x3E95F0, TOC };
- void(*SV_GameSendServerCommand)(int client, int type, char* cmd) = (void(*)(int, int, char*))&SV_GameSendServerCommand_t;
- opd_s SV_AddServerCommand_t = { 0x3EED08, TOC };
- void(*SV_AddServerCommand)(int client, int type, char* cmd) = (void(*)(int, int, char*))&SV_AddServerCommand_t;
- opd_s makeDvarServerInfo_t = { 0x31B590, TOC };
- void(*GSC_makeDvarServerInfo)() = (void(*)())&makeDvarServerInfo_t;
- opd_s UI_OpenToastPopup_t = { 0x42C198, TOC };
- void(*UI_OpenToastPopup)(int localClientNum, const char *toastPopupIconName, const char *toastPopupTitle, const char *toastPopupDesc, int toastPopupDuration) = (void(*)(int, const char *, const char *, const char *, int))&UI_OpenToastPopup_t;
- opd_s Cmd_MenuResponse_f_t = { 0x2D5AE8, TOC };
- void(*Cmd_MenuResponse_f)(gentity_s *pEnt) = (void(*)(gentity_s *))&Cmd_MenuResponse_f_t;
- opd_s SV_Cmd_ArgvBuffer_t = { 0x3997C8, TOC };
- void(*SV_Cmd_ArgvBuffer)(int arg, char *buffer, int bufferLength) = (void(*)(int, char *, int))&SV_Cmd_ArgvBuffer_t;
- opd_s AimTarget_IsTargetVisible_t = {0x58640,TOC};
- bool(*AimTarget_IsTargetVisible)(int localClientNum, int targetEnt, short visBone) = (bool(*)(int localClientNum, int targetEnt, short visBone))&AimTarget_IsTargetVisible_t;
- opd_s AimTarget_GetTagPos_t = {0x54C88,TOC};
- float*(*AimTarget_GetTagPos)( int loaclclient,int cent, short tagName, float*pos) = (float*(*)( int, int , short , float*))&AimTarget_GetTagPos_t;
- opd_s CG_LocationalTrace_t = {0x1A1C98,TOC};
- void(*CG_LocationalTrace)(trace_t* results, const float *start, const float *end, int passEntityNum, int contentMask, bool checkRopes, int col_context_t) = (void(*)(trace_t* results, const float *start, const float *end, int passEntityNum, int contentMask, bool checkRopes, int col_context_t))&CG_LocationalTrace_t;
- opd_s BG_GetWeaponDef_t = {0xC0A98,TOC};
- int(*BG_GetWeaponDef)(unsigned short weaponIndex) = (int(*)(unsigned short ))&BG_GetWeaponDef_t;
- opd_s BulletTrace_t = {0x18D6F0,TOC};
- bool(*BulletTrace)(int localClientNum, BulletFireParams *bp, int weapDef, centity_s *attacker, BulletTraceResults *br, int lastSurfaceType) = (bool(*)(int localClientNum, BulletFireParams *bp, int weapDef, centity_s *attacker, BulletTraceResults *br, int lastSurfaceType))&BulletTrace_t;
- opd_s Trace_GetEntityHitId_t = {0x38BD00,TOC};
- short(*Trace_GetEntityHitId)(trace_t *trace) = (short(*)(trace_t *trace))&Trace_GetEntityHitId_t;
- opd_s BG_GetSurfacePenetrationDepth_t = {0xA8A28,TOC};
- float(*BG_GetSurfacePenetrationDepth)(int weapDef, int surfaceType) = (float(*)(int weapDef, int surfaceType))&BG_GetSurfacePenetrationDepth_t;
- opd_s BG_AdvanceTrace_t = {0xABBB0,TOC};
- bool(*BG_AdvanceTrace)(BulletFireParams *bp, BulletTraceResults *br, float dist) = (bool(*)(BulletFireParams *bp, BulletTraceResults *br, float dist))&BG_AdvanceTrace_t;
- opd_s FireBulletPenetrate_t = { 0x001966A0, TOC };
- void(*FireBulletPenetrate)(int localClientNum, BulletFireParams *bp, unsigned int weaponIndex, centity_s* attacker, float tracerStart[3], int drawTracer, int isPlayer, BulletTraceResults *br) = (void(*)(int, BulletFireParams*, unsigned int, centity_s*, float[3], int, int, BulletTraceResults*))&FireBulletPenetrate_t;
- opd_s BG_GetSpreadForWeapon_t = {0xAB8C8,TOC};
- void(*BG_GetSpreadForWeapon)(int ps, int weapDef, float *minSpread, float *maxSpread) = (void(*)(int ps, int weapDef, float *minSpread, float *maxSpread))&BG_GetSpreadForWeapon_t;
- opd_s CL_SetViewAngles_t = {0x1A6448,TOC};
- void(*CL_SetViewAngles)(int localClientNum, const float *angles) = (void(*)(int localClientNum, const float *angles))&CL_SetViewAngles_t;
- bool CompareString(const char *str1, const char *str2)
- {
- return !strcmp(str1, str2);
- }
- opd_s UI_OpenMenu_t = { 0x42F398, TOC };
- void(*UI_OpenMenu)(int localClientNum, const char *menuName) = (void(*)(int, const char *))&UI_OpenMenu_t;
- opd_s Key_SetCatcher_t = { 0x1BE2E0, TOC };
- void(*Key_SetCatcher)(int localClientNum, int catcher) = (void(*)(int, int))&Key_SetCatcher_t;
- opd_s Key_IsCatcherActive_t = { 0x1BF680, TOC };
- bool(*Key_IsCatcherActive)(int localClientNum, int mask) = (bool(*)(int, int))&Key_IsCatcherActive_t;
- opd_s Scr_AddInt_t = { 0x5DF2A0, TOC };
- void(*Scr_AddInt)(int value, scriptInstance_t inst) = (void(*)(int, scriptInstance_t))&Scr_AddInt_t;
- opd_s Scr_AddFloat_t = { 0x5DF630, TOC };
- void(*Scr_AddFloat)(float value, scriptInstance_t inst) = (void(*)(float, scriptInstance_t))&Scr_AddFloat_t;
- opd_s Scr_AddString_t = { 0x5DE750, TOC };
- void(*Scr_AddString)(const char* value, scriptInstance_t inst) = (void(*)(const char*, scriptInstance_t))&Scr_AddString_t;
- opd_s Scr_AddVector_t = { 0x5DEB08, TOC };
- void(*Scr_AddVector)(float* value, scriptInstance_t inst) = (void(*)(float*, scriptInstance_t))&Scr_AddVector_t;
- opd_s Scr_AddConstString_t = { 0x5DEEB8, TOC };
- void(*Scr_AddConstString)(unsigned short value, scriptInstance_t inst) = (void(*)(unsigned short, scriptInstance_t))&Scr_AddConstString_t;
- opd_s Scr_AddEntity_t = { 0x355028, TOC };
- void(*Scr_AddEntity)(int value, scriptInstance_t inst) = (void(*)(int, scriptInstance_t))&Scr_AddEntity_t;
- opd_s SL_GetString_t = { 0x5B99C8, TOC };
- int(*SL_GetString)(const char* str, unsigned int user, scriptInstance_t inst) = (int(*)(const char*, unsigned int, scriptInstance_t))&SL_GetString_t;
- opd_s CG_GameMessage_t = { 0x113550, TOC };
- void(*CG_GameMessage)(int localClientNum, const char *msg) = (void(*)(int, const char *))&CG_GameMessage_t;
- opd_s CG_BoldGameMessage_t = { 0x113528, TOC };
- void(*CG_BoldGameMessage)(int localClientNum, const char *msg, int duration) = (void(*)(int, const char *, int))&CG_BoldGameMessage_t;
- opd_s Dvar_GetString_t = { 0x4C7370, TOC };
- char*(*Dvar_GetString)(const char *dvarName) = (char*(*)(const char *))&Dvar_GetString_t;
- typedef void(*UI_KeyboardCallback)(int localClientNum, const wchar_t *text, size_t size);
- opd_s ExecuteKeyboardCallback_t = { 0x56A270, TOC };
- void(*ExecuteKeyboardCallback)(int localClientNum) = (void(*)(int))&ExecuteKeyboardCallback_t;
- opd_s UI_DrawKeyboard_t = { 0x56A118, TOC };
- void(*UI_DrawKeyboard)(int localClientNum, const wchar_t *title, const wchar_t *presetMessage, size_t size, UI_KeyboardCallback function) = (void(*)(int, const wchar_t *, const wchar_t *, size_t, UI_KeyboardCallback))&UI_DrawKeyboard_t;
- void Scr_SetNumParam(scriptInstance_t inst, int numParams)
- {
- int ep = 0x1AF6334 + (inst * 0x4320) + 0x10;
- *(int*)(ep + 0xC) = numParams;
- }
- void Scr_ClearOutParams()
- {
- *(int*)(&scrVmPub->outparamcount) = 0;
- }
- opd_s ParseAddr(int Address)
- {
- opd_s GLS = { Address, TOC };
- return GLS;
- }
- ///////////////////////////////////// non-host /////////////////////////////////////
- opd_s R_AddCmdDrawStretchPic_t = { 0x751940, TOC };
- opd_s Material_RegisterHandle_t = { 0x7458D8, TOC };
- opd_s R_AddCmdDrawText_t = { 0x754410, TOC };
- opd_s R_RegisterFont_t = { 0x734350, TOC };
- void(*R_AddCmdDrawStretchPic)(float, float, float, float, float, float, float, float, float *, int) = (void(*)(float, float, float, float, float, float, float, float, float *, int))&R_AddCmdDrawStretchPic_t;
- int(*Material_RegisterHandle)(char *, int) = (int(*)(char *, int))&Material_RegisterHandle_t;
- void(*R_AddCmdDrawText)(char *, int, int, float, float, float, float, float, float *, int) = (void(*)(char *text, int maxChars, int font, float x, float y, float xScale, float yScale, float rotation, float *color, int style))&R_AddCmdDrawText_t;
- int(*R_RegisterFont)(char *, int) = (int(*)(char *name, int imageTrack))&R_RegisterFont_t;
- //structure & variables
- typedef struct vec3_t {
- float x, y, z;
- vec3_t() {
- x = y = z = 0;
- }
- vec3_t(float x, float y, float z) {
- this->x = x; this->y = y; this->z = z;
- }
- const bool operator== (vec3_t const &Vector) {
- return (this->x == Vector.x && this->y == Vector.y && this->z == Vector.z);
- }
- const vec3_t& operator* (const float mul) {
- return vec3_t(this->x *= mul, this->y *= mul, this->z *= mul);
- }
- const bool operator != (vec3_t const &Vector) {
- return (this->x != Vector.x && this->y != Vector.y && this->z != Vector.z);
- }
- const vec3_t& operator+ (vec3_t const &Vector) {
- return vec3_t(this->x + Vector.x, this->y + Vector.y, this->z + Vector.z);
- }
- vec3_t operator- (vec3_t const &Vector) {
- return vec3_t(this->x - Vector.x, this->y - Vector.y, this->z - Vector.z);
- }
- const vec3_t& operator/ (float scale) {
- return vec3_t(this->x / scale, this->y / scale, this->z / scale);
- }
- } vec3_t;
- #define ANGLE2SHORT(x) ((int)((x) * 65536.0f / 360.0f ) & 65535)
- #define SHORT2ANGLE(x) ((x) * ( 360.0f / 65536.0f ))
- #define VectorSubtract(a,b,c) ((c).x=(a).x-(b).x,(c).y=(a).y-(b).y,(c).z=(a).z-(b).z)
- #define VectorAdd(a,b,c) ((c).x=(a).x+(b).x,(c).y=(a).y+(b).y,(c).z=(a).z+(b).z)
- struct BulletFireParams
- {
- int MaxEntNum;//0
- int ignoreEntIndex;//4
- float damageMultiplier;//8
- int methodOfDeath;//c
- vec3_t origStart;//14
- vec3_t start;//18
- vec3_t end;//1c
- vec3_t dir;//20
- };
- typedef void gclient_s;
- struct gentity_s
- {
- char pad0[0x144];
- gclient_s *client;
- char pad1[0x1B0];
- };
- gentity_s *g_entities = (gentity_s *)0x12AB290;
- enum TraceHitType
- {
- TRACE_HITTYPE_NONE = 0,
- TRACE_HITTYPE_ENTITY = 1,
- TRACE_HITTYPE_DYNENT_MODEL = 2,
- TRACE_HITTYPE_DYNENT_BRUSH = 3,
- TRACE_HITTYPE_GLASS = 4,
- };
- struct trace_t
- {
- /* 0x0000 */ float normal[3];
- /* 0x000C */ char unk1[0x04];
- /* 0x0010 */ float fraction;
- /* 0x0014 */ int sflags;
- /* 0x0018 */ int cflags;
- /* 0x001c */ enum TraceHitType hitType;
- /* 0x0020 */ unsigned short hitId;
- /* 0x0022 */ unsigned short modelIndex;
- /* 0x0024 */ unsigned short partName;
- /* 0x0026 */ unsigned short boneIndex;
- /* 0x0028 */ unsigned short partGroup;
- /* 0x002a */ bool allsolid;
- /* 0x002b */ bool startsolid;
- /* 0x002c */ bool walkable;
- /* 0x002d */ char Padding_455[3];
- /* 0x0030 */ struct cStaticModel_s* staticModel;
- /* 0x0034 */ int hitPartition;
- };
- struct BulletTraceResults
- {
- trace_t trace;
- int* hitEnt; // gentity_s*
- float hitPos[3];
- int ignoreHitEnt;
- int hitSurfaceType;
- };
- //int myindex = *(int*)(*(int*)(0xC3DFB8));
- struct cpose_ts
- {
- unsigned short lightningHandle; //0x00
- unsigned char eType; //0x02
- char eTypeUnion; //0x03
- int localClientNum; //0x04
- char pad01[40]; //0x8
- //int physObjId; //0x18
- vec3_t origin; //0x30
- vec3_t angles; //0x3C
- vec3_t absmin; //0x48
- vec3_t absmax; //0x54
- char pad02[12]; //0x60
- }; //size 0x6C
- struct trajectory_t
- {
- char trType;
- int trTime;
- int trDuration;
- vec3_t trBase;
- vec3_t trDelta;
- };
- struct centity_s
- {
- cpose_ts pose; //0x00
- char pad0[0x8]; //0x6C
- vec3_t bounds[2]; //0x0074
- char _0x008C[0x30]; //0x008C
- short eventParam; //0x00BC
- char _0x00BE[0x6]; //0x00BE
- short otherEntityNum; //0x00C4
- short attackerEntityNum;//0x00C6
- char _0x00C8[0xA8]; //0x00C8
- char trType; //0x170
- int trTime; //0x174
- int trDuration; //0x178
- vec3_t NewOrigin; //0x17C
- vec3_t trDelta; //0x188
- char trType2; //0x194
- int trTime2; //0x198
- int trDuration2; //0x19C
- vec3_t trBase2; //0x1A0
- vec3_t trDelta2; //0x1AC
- char pad_u[32]; //0x1B8
- int useCount; //0x1D8
- int clientnum; //0x1DC
- int eFlags; //0x1E0
- int eFlags2; //0x1E4
- trajectory_t pos; //0x1E8
- trajectory_t apos; //0x20C
- char _0x0230[0x14]; //0x0230
- int actorTeam; //0x0244
- short primaryWeapon; //0x0248
- char _0x024A[0xB]; //0x024A
- char renderCamo; //0x0255
- char _0x0256[0x2A]; //0x0256
- int item; //0x0280
- char _0x0284[0x16]; //0x0284
- short eType; //0x29A
- short hitEntityNum; //0x029C
- char pad00[8]; //0x29E
- unsigned short weapon;//0x2A6
- char pad000[0x74]; //0x2A8
- };
- /*struct centity_s
- {
- char _0x0000[0x2]; //0x0000
- short Alive; //0x0002
- char _0x0004[0x2C]; //0x0004
- vec3_t origin; //0x0030
- char _0x003C[0xC]; //0x003C
- vec3_t absBounds[2]; //0x0048
- char _0x0060[0x14]; //0x0060 char _0x006C[0x8]; //0x006c
- vec3_t bounds[2]; //0x0074
- char _0x008C[0x30]; //0x008C
- short eventParam; //0x00BC
- char _0x00BE[0x6]; //0x00BE
- short otherEntityNum; //0x00C4
- short attackerEntityNum;//0x00C6
- char _0x00C8[0x120]; //0x00C8
- int number; //0x01E8
- int eFlags; //0x01EC
- int eFlags2; //0x01F0
- char _0x01F4[0x50]; //0x01F4
- int actorTeam; //0x0244
- short primaryWeapon; //0x0248
- char _0x024A[0xB]; //0x024A
- char renderCamo; //0x0255
- char _0x0256[0x2A]; //0x0256
- int item; //0x0280
- char _0x0284[0x22]; //0x0284
- short eType; //0x02A6
- short hitEntityNum; //0x02A8
- char _0x00AA[0x2]; //0x02AA
- short sourceEntityNum; //0x02AC
- char _0x02A8[0x6E]; //0x02AE
- //size: 0x031C
- };*/
- #pragma region objective_t
- struct objective_t
- {
- int state; //0x00
- float origin[3]; //0x04
- float size[2]; //0x10
- int entNum; //0x18
- int teamNum; //0x1C
- int icon; //0x20
- int use3D; //0x24
- int color; //0x28
- const char* alt_3D_text; //0x2C
- }; //size 0x30
- #pragma endregion
- struct playerstate_s
- {
- unsigned int commandTime; //0x0
- int pm_type; //0x4
- int bobCycle; //0x8
- int pm_flags; //0xC
- int weapFlags; //0x10
- int otherFlags; //0x14
- int pm_time; //0x18
- unsigned int loopSoundId; //0x1C
- int loopSoundFade; //0x20
- float origin[3]; //0x24
- float velocity[3]; //0x30
- int weaponTime; //0x3C
- int weaponDelay; //0x40
- int weaponTimeLeft; //0x44
- int weaponDelayLeft; //0x48
- int weaponIdleTime; //0x4C
- int grenadeTimeLeft; //0x50
- int throwBackGrenadeOwner; //0x54
- int throwBackGrenadeTimeLeft; //0x58
- int weaponRestrictKickTime; //0x5C
- bool mountAvailable; //0x60
- bool bRunLeftGun; //0x61
- bool bCarryingTurret; //0x62
- char pad01[0x1]; //0x63
- float mountPos[3]; //0x64
- float mountDir; //0x70
- int foliageSoundTime; //0x74
- int gravity; //0x78
- float leanf; //0x7C
- int speed; //0x80
- float delta_angles[3]; //0x84
- int groundEntityNum; //0x90
- int groundType; //0x94
- float vLadderVec[3]; //0x98
- int jumpTime; //0xA4
- float jumpOriginZ; //0xA8
- int slideTime; //0xAC
- int moveType; //0xB0
- int legsTimer; //0xB4
- int torsoTimer; //0xB8
- short legsAnim; //0xBC
- short torsoAnim; //0xBE
- int legsAnimDuration; //0xC0
- int torsoAnimDuration; //0xC4
- int damageTimer; //0xC8
- int damageDuration; //0xCC
- int dmgDirection; //0xD0
- int dmgType; //0xD4
- int corpseIndex; //0xD8
- int movementDir; //0xDC
- int eFlags; //0xE0
- int eFlags2; //0xE4
- short predictableEventSequence; //0xE8
- short predictableEventSequenceOld; //0xEA
- int predictableEvents[4]; //0xEC
- unsigned int predictableEventParms[4]; //0xFC
- short unpredictableEventSequence; //0x10C
- short unpredictableEventSequenceOld; //0x10E
- int unpredictableEvents[4]; //0x110
- unsigned int unpredictableEventParms[4]; //0x120
- char clientNum; //0x130
- int offHandIndex; //0x134
- int offhandSecondary; //0x138
- int offhandPrimary; //0x13C
- char pad00[4]; //0x140
- unsigned short weapon; //0x144
- unsigned short lastStandPrevWeapon; //0x146
- unsigned int lastWeaponAltModeSwitch;//0x148
- unsigned int stowedWeapon; //0x14C
- char stowedWeaponCamo; //0x150
- unsigned int meleeWeapon; //0x154
- int weaponstate; //0x158
- int weaponstateLeft; //0x15C
- unsigned int weaponShotCount; //0x160
- unsigned int weaponShotCountLeft; //0x164
- float fWeaponPosFrac; //0x168
- int adsDelayTime; //0x16C
- int spreadOverride; //0x170
- int spreadOverrideState; //0x174
- float weaponSpinLerp; //0x178
- int viewmodelIndex; //0x17C
- vec3_t viewangles; //0x180
- char pad03[0x3D4]; // 0x18C
- float aimSpreadScale; //0x560
- char pad04[0x58]; // 0x564
- objective_t objective[0x20];//0x5BC
- int deltaTime; //0xBBC
- int killCamEntity; //0xBC0
- int killCamTargetEntity; //0xBC4
- }; //size 0xBC8
- #pragma region refdef_s
- struct refdef_s
- {
- unsigned int x; //0x00
- unsigned int y; //0x04
- unsigned int width; //0x08
- unsigned int height; //0x0C
- char pad01[0x14]; //0x10
- float tanHalfFovX; //0x24
- float tanHalfFovY; //0x28
- float fov_x; //0x2C
- vec3_t vieworg; //0x30
- float yaw; //0x3C
- float viewaxis[3][3]; //0x40
- int time; //0x64
- }; //size 0x68
- #pragma endregion
- #pragma region snapshot_s
- struct snapshot_s
- {
- int snapFlags; //0x00
- int ping; //0x04
- int serverTime; //0x08
- int physicsTime; //0x0C
- playerstate_s ps; //0x10
- int numEntities;
- int numClients;
- //entityState_s entities[512];
- //clientState_s clients[32];
- char matchState_pad[0x80];
- int serverCommandSequence;
- };
- #pragma endregion
- #pragma region score_s
- struct score_s
- {
- int ping; //0x00
- int status_icon; //0x04
- int place; //0x08
- int score; //0x0C
- int kills; //0x10
- int assists; //0x14
- int deaths; //0x18
- int scoreboardColumns[4]; //0x1C
- }; //size 0x2C
- #pragma endregion
- #pragma region clientInfo_t
- struct lerpFrame_t
- {
- float yawAngle; //0x00
- int yawing; //0x04
- float pitchAngle; //0x08
- int pitching; //0x0C
- int animationNumber; //0x10
- void* animation; //0x14
- int animationTime; //0x18
- float oldFramePos[3]; //0x1C
- float oldFrameYaw; //0x28
- float animSpeedScale; //0x2C
- int oldFrameSnapshotTime; //0x30
- }; //size 0x34
- struct clientInfo_t
- {
- int infoValid; //0x00
- int nextValid; //0x04
- int clientNum; //0x08
- char name[0x20]; //0x0C
- int team; //0x2C
- int oldTeam; //0x30
- int ffaTeam; //0x34
- int rank; //0x38
- int prestige; //0x3C
- int needsRevive; //0x40
- unsigned int perks[2]; //0x44
- char pad01[0x4]; //0x4C
- unsigned long long xuid; //0x50
- char clanAbbrev[0x8]; //0x58
- score_s score; //0x60
- void* hStatusIcon; //0x8C
- void* hRankIcon; //0x90
- int location; //0x94
- int health; //0x98
- char model[0x40]; //0x9C
- char attachModelNames[0x6][0x40]; //0xDC
- char attachTagNames[0x6][0x40]; //0x1C0
- lerpFrame_t legs; //0x25C
- lerpFrame_t torso; //0x290
- float lerpMoveDir; //0x2C4
- float lerpLean; //0x2C8
- float playerAngles[3]; //0x2CC
- int leftHandGun; //0x2D8
- int dobjDirty; //0x2DC
- char pad02[0x170]; //0x2E0
- }; //size 0x5D0
- #pragma endregion
- #pragma region cg_s
- struct cg_s
- {
- int clientNum; //0x00
- int localClientNum; //0x04
- char pad01[0x18]; //0x08
- int latestSnapshotNum; //0x20
- int latestSnapshotTime; // 0x24
- snapshot_s* snap; //0x28
- snapshot_s* nextSnap; //0x2C
- char pad02[0x58]; //0x30
- int serverTime; //0x88
- char pad03[0x28]; //0x8C
- float origin[3]; //0xB4
- char pad04[0x1C]; //0xC0
- int lastAimTime; //0xDC
- char pad05[0x4]; //0xE0
- int maxEntities; //0xE4
- char pad06[0x88]; //0xE8
- int stance; //0x170
- char pad07[0x60]; //0x174
- unsigned short weapon; //0x1D4
- char pad08[0x7E]; //0x1D8
- int health; //0x254
- char pad09[0x3ED44]; //0x258
- playerstate_s ps; //0x3EF9C
- char pad10[0x1E9C]; // 0x3FB64
- refdef_s refdef; //0x41A00
- char pad11[0x1BE78]; //0x41A68
- float compassNorthYaw; //0x5D8E0
- float compassNorth[2]; //0x5D8E4
- void* compassMapMaterial; //0x5D8EC
- float compassMapUpperLeft[2]; //0x5D8F0
- float compassMapWorldSize[2]; //0x5D8F8
- int compassLastTime; //0x5D900
- float compassYaw; //0x5D904
- float compassSpeed; //0x5D908
- int compassFadeTime; //0x5D90C
- char pad12[0x1E8]; //0x5D910
- clientInfo_t clientInfo[18]; //0x5DAF8
- };
- #pragma endregion
- struct usercmd_s
- {
- int serverTime;//0x00
- int button_bits[2];//0x04
- float angles[3]; //0x0C
- unsigned short weapon;//0x18
- unsigned short offHandIndex;//0x1A
- unsigned short lastWeaponAltModeSwitch;//0x1C
- char forwardmove;//0x1E
- char rightmove;//0x1F
- char upmove;//0x20
- char pitchmove;//0x21
- char yawmove;//0x22
- char pad00;//0x23
- float meleeChargeYaw;//0x24
- char meleeChargeDist;//0x28
- char pad01[3];//0x29
- float rollmove;//0x2C
- char selectedLocation[2];//0x30
- char selectedYaw;//0x32
- char pad03;//0x33
- };//size 0x34
- #pragma region clientActive_t
- struct clientActive_t
- {
- char pad01[0x10]; //0x00
- int serverTime; //0x10
- int oldServerTime; //0x14
- int oldFrameServerTime; //0x18
- int serverTimeDelta; //0x1C
- int ping; //0x20
- char pad02[0x88]; //0x24
- vec3_t deltaAngles; //0xAC
- char pad03[0x2794]; //0xB8
- vec3_t viewAngle; //0x284C
- char pad04[0x40010]; //0x2858
- usercmd_s cmds[0x80]; //0x42868
- int cmdNumber; //0x44268
- }; //size 0x4426C
- #pragma endregion
- #define clientActive (*(clientActive_t**)(0xD223C4))
- #define centity ((centity_s*)(0x377e3a08))
- #define cg ((cg_s*)(*(int*)(0xC3DFB8)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement