Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class MW2RPC
- {
- //Fixed MW2 RPC for 1.14 by Vezah, i know SC58 released an RPC but it didnt return anything so i fixed it :PP
- //This is to use the Functions that seb released !
- public static uint function_address;
- public static int Init()
- {
- function_address = Get_func_address();
- if (function_address == 0) return -1;
- Enable_RPC();
- return 0;
- }
- public static uint Get_func_address()
- {
- for (uint i = 0x10A24; i < 0x1000000; i += 4)
- {
- byte[] bytes = PS3.ReadBytes(i, 8);
- if (((bytes[0] == 0xec) && (bytes[1] == 0x21) && (bytes[2] == 0x00) && (bytes[3] == 0x32) && (bytes[4] == 0x4e) && (bytes[5] == 0x80) && (bytes[6] == 0x00) && (bytes[7] == 0x20)))
- {
- return i + 0xC;
- }
- }
- return 0;
- }
- public static int CallFunc(uint uint_1, params object[] object_0)
- {
- int length = object_0.Length;
- uint num2 = 0;
- for (uint i = 0; i < length; i++)
- {
- byte[] buffer;
- if (object_0[i] is int)
- {
- buffer = BitConverter.GetBytes((int)object_0[i]);
- Array.Reverse(buffer);
- PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer);
- }
- else if (object_0[i] is uint)
- {
- buffer = BitConverter.GetBytes((uint)object_0[i]);
- Array.Reverse(buffer);
- PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer);
- }
- else if (object_0[i] is string)
- {
- byte[] buffer2 = Encoding.UTF8.GetBytes(Convert.ToString(object_0[i]) + "\0");
- PS3.SetMemory(0x10050054 + (i * 0x400), buffer2);
- uint num4 = 0x10050054 + (i * 0x400);
- byte[] array = BitConverter.GetBytes(num4);
- Array.Reverse(array);
- PS3.SetMemory(0x10050000 + ((i + num2) * 4), array);
- }
- else if (object_0[i] is float)
- {
- num2++;
- buffer = BitConverter.GetBytes((float)object_0[i]);
- Array.Reverse(buffer);
- PS3.SetMemory(0x10050024 + ((num2 - 1) * 4), buffer);
- }
- }
- byte[] bytes = BitConverter.GetBytes(uint_1);
- Array.Reverse(bytes);
- PS3.SetMemory(0x1005004c, bytes);
- Thread.Sleep(20);
- byte[] buffer5 = new byte[4];
- PS3.GetMemory(0x10050050, buffer5);
- Array.Reverse(buffer5);
- return BitConverter.ToInt32(buffer5, 0);
- }
- public static void Enable_RPC()
- {
- PS3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- byte[] buffer = new byte[] {
- 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 5, 0x81, 0x83, 0, 0x4c,
- 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
- 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
- 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
- 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
- 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
- 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 5, 0x38, 160, 0, 0,
- 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
- 0x38, 0x21, 0, 0x70, 0x4e, 0x80, 0, 0x20
- };
- PS3.SetMemory(function_address + 4, buffer);
- PS3.SetMemory(0x10050000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.SetMemory(0x2100000, new byte[0x20]);
- PS3.SetMemory(0x2105000, new byte[0x20]);
- }
- }
- { PS3 MW2 1.14 Address & Functions } //Credit - SC58
- 0x002189D8 - Sv_Addtestclient(void)
- 0x001ACBE8 - GScr_AddTestClient
- 0x00211D98 - SV_AddOperatorCommands(void)
- 0x0021F1B0 - SV_AddServerCommand(client_s *client, svscmd_type type, const char *cmd)
- 0x002131A8 - SV_MapRestart(int fast_restart)
- 0x0021F6A8 - SV_SendServerCommand(client_s *cl, svscmd_type type, const char *fmt)
- 0x00212C40 - SV_KickClient(client_s *cl, char *playerName, int maxPlayerNameLen)
- 0x0017B830 - ClientCommand(int clientNum)
- 0x00215310 - SV_ExecuteClientCommand(client_s *cl, const char *s, int clientOK)
- 0x00217880 - SV_DirectConnect(netadr_t from)
- 0x001D9270 - SV_Cmd_EndTokenizedString(void)
- 0x001DB040 - SV_Cmd_TokenizeString(const char *text_in)
- 0x00183DD0 - G_RegisterWeapon(unsigned int weapIndex)
- 0x00172508 - PlayerCmd_SetViewmodel(scr_entref_t entref)
- 0x00032898 - BG_GetWeaponDef(unsigned int weaponIndex)
- 0x00032948 - BG_GetWeaponIndex(WeaponDef *weapDef) (Maybe?)
- 0x00032F90 - BG_GetWeaponIndexForName(const char *name, void (__cdecl *regWeap)(unsigned int))
- 0x00033140 - CG_GetWeaponIndexForName(const char *name)
- 0x0021A0A0 - SV_GameSendServerCommand(int clientNum, svscmd_type type, const char *text)
- 0x00168070 - ClientInactivityTimer(gclient_s *client)
- 0x001689D8 - ClientThink_real(gentity_s *ent, usercmd_s *ucmd)
- 0x0016CF90 - PlayerCmd_giveWeapon(scr_entref_t entref)
- 0x00179590 - CheatsOk(gentity_s *ent)
- 0x00020D70 - BG_GetPerkIndexForName(const char *perkName)
- 0x0021B818 - SV_SetConfigstring(int index, const char *val)
- 0x0027E0D0 - va(const char *format)
- 0x001D9EC0 - Cbuf_AddText(int localClientNum, const char *text)
- 0x001BE3F0 - G_SetModel(gentity_s *ent, const char *modelName)
- 0x00277068 - Dvar_GetFloat(const char *dvarName)
- 0x00276F60 - Dvar_GetString(const char *dvarName)
- 0x00277138 - Dvar_GetBool(const char *dvarName)
- 0x002770C8 - Dvar_GetInt(const char *dvarName)
- 0x0005EF68 - CG_BoldGameMessage(int localClientNum, const char *msg)
- 0x0005EFB0 - CG_GameMessage(int localClientNum, const char *msg)
- 0x001C0890 - G_GivePlayerWeapon(playerState_s *pPS, int iWeaponIndex, char altModelIndex)
- 0x001BF4A0 - G_GetWeaponIndexForName(const char *name)
- 0x0016C148 - ClientDisconnect(int clientNum)
- 0x00215310 - SV_ClientCommand(client_s *cl, msg_t *msg)
- 0x00215EB0 - SV_ExecuteClientMessage(client_s *cl, msg_t *msg)
- 0x00179F88 - G_Say(gentity_s *ent, gentity_s *target, int mode, const char *chatText)
- 0x01319780 - g_entity
- 0x00013460 - AimTarget_GetTagPos(int localClientNum, centity_s *cent, unsigned int tagName, float *pos)
- 0x000116B0 - AimAssist_RegisterDvars
- 0x001BCD10 - G_Spawn(void)
- 0x001B8310 - G_CallSpawnEntity(gentity_s *ent)
- 0x001BE0B8 - G_GetModelIndex
- 0x0017B830 - ClientCommand(int clientNum)
- 0x00186638 - Add_Ammo(gentity_s *ent, unsigned int weaponIndex, char weaponModel, int count, int fillClip)
- 0x00174BF8 - G_InitializeAmmo(gentity_s *pSelf, int weaponIndex, char weaponModel, int hadWeapon)
- 0x000329A8 - BG_FindWeaponIndexForName(const char *name)
- 0x0016C558 - ClientUserinfoChanged(int clientNum)
- 0x0016C450 - ClientCleanName(const char *in, char *out, int outSize)
- 0x001BE228 - G_EntAttach(gentity_s *ent, const char *modelName, unsigned int tagName, int ignoreCollision)
- 0x0017CBC0 - Player_Die(gentity_s* self, gentity_s* inflictor, gentity_s* attacker, int damage, int meansOfDeath, int WeaponIndex, const float *vDir, int hitLocation, int psTime)
- set aim_autoaim_lerp 100
- set aim_autoaim_region_height 480
- set aim_autoaim_region_width 640
- set aim_aimAssistRangeScale 2
- set aim_autoAimRangeScale 2
- set aim_slowdown_debug 0
- set aim_slowdown_region_height 0
- set aim_slowdown_region_width 0
- set aim_lockon_enabled 1
- set aim_lockon_strength 1
- set aim_lockon_deflection 0
- set aim_autoaim_enabled 0
- set aim_slowdown_yaw_scale_ads 0
- set aim_slowdown_pitch_scale_ads 0
- set aim_slowdown_enabled 1
- bind button_rshldr vstr SingleFire
- set SingleFire "aim_autoaim_enabled 1;aim_lockon_enabled 1;wait 1;+attack;-attack;wait 1;aim_autoaim_enabled 0"
Add Comment
Please, Sign In to add comment