Advertisement
MrDarkblue

MW3 1.24 C++ Host Basic Functions

Nov 26th, 2018
573
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 13.77 KB | None
  1. VOID SetModel(INT32 client, CSTRING Model)
  2. {
  3.     Call<VOID>(0x1bef5c, 0xFCA280 + (client * 0x280), Model);
  4. }
  5. VOID SetHeadModel(INT32 client, INT32 Index)
  6. {
  7.     *(int*)(0x00fca49a + (client * 0x280)) = Index;
  8. }
  9. VOID SV_Kickclient(INT32 client, CSTRING Message){
  10.     Call<VOID>(0x223BD0, client, Message);
  11. }
  12. VOID SetVision(INT32 C, CSTRING Vision, INT32 FadeTime)
  13. {
  14.     SV_GameSendServerCommand(C, Va("J \"%s\"%i", Vision, FadeTime, "\""));
  15. }
  16. VOID SetThermalScopeVision(INT32 C, CSTRING Vision, INT32 FadeTime)
  17. {
  18.     SV_GameSendServerCommand(C, Va("M \"%s\"%i", Vision, FadeTime, "\""));
  19. }
  20. VOID SetBlur(INT32 Value)
  21. {
  22.     Cbuf_AddText(Va("r_blur \"%i", Value, "\""));
  23. }
  24. VOID SetWaterVision(INT32 C, INT32 Value = 1)
  25. {
  26.     SV_GameSendServerCommand(C, Va("J \"%i", Value, "\""));
  27. }
  28. INT32 G_Spawn(){
  29.     Call<INT32>(0x1C058C);
  30. }
  31. VOID SV_SetBrushModel(INT32 Entity){
  32.     Call<VOID>(0x22925C, Entity);
  33. }
  34. VOID SP_Script_Model(INT32 Entity){
  35.     Call<VOID>(0x1B6F68, Entity);
  36. }
  37. VOID SV_UnlinkEntity(INT32 Entity){
  38.     Call<VOID>(0x002377B8, Entity);
  39. }
  40. INT32 G_SetOrigin(INT32 Entity, FLOAT *Origin){
  41.     Call<INT32>(0x1C0B14, Entity, Origin);
  42. }
  43. INT32 G_SetAngles(INT32 Entity, FLOAT *Origin){
  44.     Call<INT32>(0x1C0D74, Entity, Origin);
  45. }
  46. VOID G_SpawnTurret(INT32 Entity, CSTRING Type){
  47.     Call<VOID>(0x01CF0E8, Entity, Type);
  48. }
  49. VOID G_SpawnVehicle(INT32 Entity, INT32 Client, CSTRING Vehicle, CSTRING Model){
  50.     Call<VOID>(0x320D98, Entity, Client, Vehicle, Model);
  51. }
  52. INT32 G_EntEnablePhysics(INT32 Entity){
  53.     Call<INT32>(0x0018AB54, Entity, 0);
  54. }
  55. INT32 SpawnTurret(FLOAT* Origin, FLOAT* Angles, CSTRING Model = "weapon_minigun", CSTRING Type = "sentry_minigun_mp", BOOL Lazer = TRUE)
  56. {
  57.     INT32 Entity = G_Spawn();
  58.     G_SetOrigin(Entity, Origin);
  59.     G_SetAngles(Entity, Origin);
  60.     SetModel(Entity, Model);
  61.     G_SpawnTurret(Entity, Type);
  62.     write_process(Entity + 9, (CHAR*)(Lazer ? 1 : 0), 1);
  63.     return Entity;
  64. }
  65. INT32 SpawnVehicle(INT32 Client, FLOAT* Origin, FLOAT* Angles, CSTRING Vehicle = "littlebird_mp", CSTRING Model = "vehicle_little_bird_armed")
  66. {
  67.     INT32 Entity = G_Spawn();
  68.     G_SetOrigin(Entity, Origin);
  69.     G_SetAngles(Entity, Origin);
  70.     G_SpawnVehicle(Entity, Client, Vehicle, Model);
  71.     return Entity;
  72. }
  73. enum DamageFlag
  74. {
  75.     None = 0,
  76.     GodMode = 1,
  77.     NoKnockback = 8,
  78.     GodModeNoKB = 9,
  79. };
  80. VOID SetDamageFlag(int client, DamageFlag DF){
  81.      write_process(0xfca407 + (client * 0x280), (char*)DF, 1);
  82. }
  83.  
  84. enum MovementType
  85. {
  86.     Normal = 0,
  87.     UFO = 1,
  88.     NoClip = 2,
  89.     Freeze = 4,
  90. };
  91. VOID SetMovementType(int client, MovementType MT){
  92.     write_process(0x0110d87f + (client * 0x3980), (char*)MT, 1);
  93. }
  94.  
  95. enum RadarType
  96. {
  97.     Off,
  98.     UAV,
  99.     ConstantUAV,
  100.     AdvancedUAV,
  101.     ConstantAdvaned,
  102.     Jammed,
  103. };
  104. VOID GPUAV(INT32 client, BOOL Constant, BOOL Scanline, BOOL Advanced, BOOL FastScanline, BOOL Jammed)
  105. {
  106.     char bytesOn[2] = { 1, 255 };
  107.     char bytesOff[2] = { 0, 0 };
  108.     //SetDvar((int)Client, "g_compassshowenemies " + (int)(Constant ? 1 : 0));
  109.     write_process(0x0110d73b + (client * 0x3980), (char*)(Scanline ? 1 : 0), 1);
  110.     write_process(0x0110d747 + (client * 0x3980), (char*)(Advanced ? 1 : 0), 1);
  111.     write_process(0x0110D74B + (client * 0x3980), (char*)(FastScanline ? 1 : 0), 1);
  112.     write_process(0x0110d73f + (client * 0x3980), Jammed ? bytesOn : bytesOff, sizeof(Jammed ? bytesOn : bytesOff));
  113. }
  114. VOID SetRadarType(INT32 client, RadarType RT = ConstantAdvaned, BOOL Scanline = false, BOOL FastScanline = false)
  115. {
  116.     if (RT == Off)
  117.         GPUAV(client, false, false, false, false, false);
  118.     else if (RT == UAV)
  119.         GPUAV(client, false, true, false, FastScanline, false);
  120.     else if (RT == AdvancedUAV)
  121.         GPUAV(client, false, true, true, FastScanline, false);
  122.     else if (RT == ConstantUAV)
  123.         GPUAV(client, true, Scanline, false, FastScanline, false);
  124.     else if (RT == ConstantAdvaned)
  125.         GPUAV(client, true, Scanline, true, FastScanline, false);
  126.     else if (RT == Jammed)
  127.         GPUAV(client, false, false, false, false, true);
  128. }
  129.  
  130. BOOL H_GodMode_t[18];
  131. void H_GodMode(int client){
  132.     H_GodMode_t[client] = !H_GodMode_t[client];
  133.     char bytesOn[] = { 0x09 };
  134.     char bytesOff[] = { 0x00 };
  135.     write_process(0xfca407 + (client * 0x280), H_GodMode_t[client] ? bytesOn : bytesOff, sizeof(H_GodMode_t[client] ? bytesOn : bytesOff));
  136.     iPrintln(client, Va("Godmode: %s", H_GodMode_t[client] ? "^2On" : "^1Off"));
  137. }
  138. void H_UnlimitedAmmo(int client){
  139.     char Bytes[8] = { 15, 0xff, 0xff, 0xff, 15, 0xff, 0xff, 0xff };
  140.     //Primary
  141.     write_process(0x110a6a8 + (client * 0x3980), Bytes, 8);
  142.     write_process(0x110a628 + (client * 0x3980), Bytes, 8);
  143.     //Secondary
  144.     write_process(0x110a690 + (client * 0x3980), Bytes, 8);
  145.     write_process(0x110a618 + (client * 0x3980), Bytes, 8);
  146.     //Grenade
  147.     write_process(0x110a69c + (client * 0x3980), Bytes, 8);
  148.     //Smoke
  149.     write_process(0x110a6b4 + (client * 0x3980), Bytes, 8);
  150.     //
  151.     iPrintln(client, Va("UnlimitedAmmo ^2ON %i", test()));
  152. }
  153.  
  154.  
  155. BOOL H_RedBoxes_t[18];
  156. void H_RedBoxes(int client){
  157.     H_RedBoxes_t[client] = !H_RedBoxes_t[client];
  158.     char bytesOn[] = { 0x01 };
  159.     char bytesOff[] = { 0x00 };
  160.     write_process(0x110a293 + (client * 0x3980), H_RedBoxes_t[client] ? bytesOn : bytesOff, sizeof(H_RedBoxes_t[client] ? bytesOn : bytesOff));
  161.     iPrintln(client, Va("RedBoxes: %s", H_RedBoxes_t[client] ? "^2On" : "^1Off"));
  162. }
  163. BOOL H_UAV_t[18];
  164. void H_UAV(int client){
  165.     H_UAV_t[client] = !H_UAV_t[client];
  166.     char bytesOn[] = { 0x02 };
  167.     char bytesOff[] = { 0x00 };
  168.     write_process(0x5F067 + (client * 0x3980), H_UAV_t[client] ? bytesOn : bytesOff, sizeof(H_UAV_t[client] ? bytesOn : bytesOff));
  169.     iPrintln(client, Va("UAV: %s", H_UAV_t[client] ? "^2On" : "^1Off"));
  170. }
  171. BOOL H_AUAV_t[18];
  172. void H_AUAV(int client){
  173.     H_AUAV_t[client] = !H_AUAV_t[client];
  174.     char bytesOn[17] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01 };
  175.     char bytesOff[17] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
  176.     write_process(0x110D73B + (client * 0x3980), H_AUAV_t[client] ? bytesOn : bytesOff, sizeof(H_AUAV_t[client] ? bytesOn : bytesOff));
  177.     iPrintln(client, Va("AUAV: %s", H_AUAV_t[client] ? "^2On" : "^1Off"));
  178. }
  179. BOOL H_CUAV_t[18];
  180. void H_CUAV(int client){
  181.     H_CUAV_t[client] = !H_CUAV_t[client];
  182.     char bytesOn[5] = { 0x01, 0xFF, 0xFF, 0xFF, 0xFD };
  183.     char bytesOff[5] = { 0x00, 0x00, 0x00, 0x00, 0x00 };
  184.     write_process(0x110D73F + (client * 0x3980), H_CUAV_t[client] ? bytesOn : bytesOff, sizeof(H_CUAV_t[client] ? bytesOn : bytesOff));
  185.     iPrintln(client, Va("CUAV: %s", H_AUAV_t[client] ? "^2On" : "^1Off"));
  186. }
  187. BOOL H_NoRecoil_t[18];
  188. void H_NoRecoil(int client){
  189.     H_NoRecoil_t[client] = !H_NoRecoil_t[client];
  190.     char bytesOn[] = { 0x04 };
  191.     char bytesOff[] = { 0x00 };
  192.     write_process(0x110a5f6 + (client * 0x3980), H_NoRecoil_t[client] ? bytesOn : bytesOff, sizeof(H_NoRecoil_t[client] ? bytesOn : bytesOff));
  193.     iPrintln(client, Va("No Recoil: %s", H_NoRecoil_t[client] ? "^2On" : "^1Off"));
  194. }
  195. BOOL H_NoSpread_t[18];
  196. void H_NoSpread(int client){
  197.     H_NoSpread_t[client] = !H_NoSpread_t[client];
  198.     char bytesOn[] = { 0x02 };
  199.     char bytesOff[] = { 0x00 };
  200.     write_process(0x110df8b + (client * 0x3980), H_NoSpread_t[client] ? bytesOn : bytesOff, sizeof(H_NoSpread_t[client] ? bytesOn : bytesOff));
  201.     iPrintln(client, Va("No Spread: %s", H_NoSpread_t[client] ? "^2On" : "^1Off"));
  202. }
  203. void H_Suicide(int client){
  204.     char Bytes[] = { 0xFF };
  205.     write_process(0x110a2a5 + (client * 0x3980), Bytes, 1);
  206.     iPrintln(client, "^1Suicide");
  207. }
  208. BOOL H_Freeze_t[18];
  209. void H_Freeze(int client){
  210.     H_Freeze_t[client] = !H_Freeze_t[client];
  211.     char bytesOn[] = { 0x07 };
  212.     char bytesOff[] = { 0x00 };
  213.     write_process(0x110d87f + (client * 0x3980), H_Freeze_t[client] ? bytesOn : bytesOff, sizeof(H_Freeze_t[client] ? bytesOn : bytesOff));
  214.     iPrintln(client, Va("Freeze: %s", H_Freeze_t[client] ? "^2On" : "^1Off"));
  215. }
  216. BOOL H_NightVision_t[18];
  217. void H_NightVision(int client){
  218.     H_NightVision_t[client] = !H_NightVision_t[client];
  219.     char bytesOn[] = { 0xFF };
  220.     char bytesOff[] = { 0x00 };
  221.     write_process(0x110a5f7 + (client * 0x3980), H_NightVision_t[client] ? bytesOn : bytesOff, sizeof(H_NightVision_t[client] ? bytesOn : bytesOff));
  222.     iPrintln(client, Va("NightVision: %s", H_NightVision_t[client] ? "^2On" : "^1Off"));
  223. }
  224. BOOL H_ChangeTeam_t[18];
  225. void H_ChangeTeam(int client){
  226.     H_ChangeTeam_t[client] = !H_ChangeTeam_t[client];
  227.     char bytesOn[] = { 0x02 };
  228.     char bytesOff[] = { 0x01 };
  229.     write_process(0x110d657 + (client * 0x3980), H_ChangeTeam_t[client] ? bytesOn : bytesOff, sizeof(H_ChangeTeam_t[client] ? bytesOn : bytesOff));
  230.     iPrintln(client, Va("ChangeTeam: %s", H_ChangeTeam_t[client] ? "^2Enemy Team" : "^1Your Team"));
  231. }
  232. BOOL H_NoClip_t[18];
  233. void H_NoClip(int client){
  234.     H_NoClip_t[client] = !H_NoClip_t[client];
  235.     char bytesOn[] = { 0x02 };
  236.     char bytesOff[] = { 0x00 };
  237.     write_process(0x110d87f + (client * 0x3980), H_NoClip_t[client] ? bytesOn : bytesOff, sizeof(H_NoClip_t[client] ? bytesOn : bytesOff));
  238.     iPrintln(client, Va("NoClip: %s", H_NoClip_t[client] ? "^2On" : "^1Off"));
  239. }
  240. BOOL H_Invisibility_t[18];
  241. void H_Invisibility(int client){
  242.     H_Invisibility_t[client] = !H_Invisibility_t[client];
  243.     char bytesOn[] = { 0xFF };
  244.     char bytesOff[] = { 0x00 };
  245.     write_process(0xfca37f + (client * 0x280), H_Invisibility_t[client] ? bytesOn : bytesOff, sizeof(H_Invisibility_t[client] ? bytesOn : bytesOff));
  246.     iPrintln(client, Va("Invisibility: %s", H_Invisibility_t[client] ? "^2On" : "^1Off"));
  247. }
  248. BOOL H_ExplosiveBullets_t[18];////////////////////
  249. void H_ExplosiveBullets(int client){
  250.     H_ExplosiveBullets_t[client] = !H_ExplosiveBullets_t[client];
  251.     char bytesOn[] = { 0xFF };
  252.     char bytesOff[] = { 0x00 };
  253.     write_process(0x110a773 + (client * 0x3980), H_ExplosiveBullets_t[client] ? bytesOn : bytesOff, sizeof(H_ExplosiveBullets_t[client] ? bytesOn : bytesOff));
  254.     iPrintln(client, Va("ExplosiveBullets: %s", H_ExplosiveBullets_t[client] ? "^2On" : "^1Off"));
  255. }
  256. BOOL H_AllPerks_t[18];
  257. void H_AllPerks(int client){
  258.     H_AllPerks_t[client] = !H_AllPerks_t[client];
  259.     char bytesOn[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
  260.     char bytesOff[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
  261.     write_process(0x110a76d + (client * 0x3980), H_AllPerks_t[client] ? bytesOn : bytesOff, sizeof(H_AllPerks_t[client] ? bytesOn : bytesOff));
  262.     iPrintln(client, Va("AllPerks: %s", H_AllPerks_t[client] ? "^2On" : "^1Off"));
  263. }
  264. BOOL H_DisableSprint_t[18];
  265. void H_DisableSprint(int client){
  266.     H_DisableSprint_t[client] = !H_DisableSprint_t[client];
  267.     char bytesOn[] = { 0x0f };
  268.     char bytesOff[] = { 0x00 };
  269.     write_process(0x110a28e + (client * 0x3980), H_DisableSprint_t[client] ? bytesOn : bytesOff, sizeof(H_DisableSprint_t[client] ? bytesOn : bytesOff));
  270.     iPrintln(client, Va("DisableSprint: %s", H_DisableSprint_t[client] ? "^2On" : "^1Off"));
  271. }
  272. BOOL H_ThirdPerson_t[18];
  273. void H_ThirdPerson(int client){
  274.     H_ThirdPerson_t[client] = !H_ThirdPerson_t[client];
  275.     char bytesOn[] = { 0x01 };
  276.     char bytesOff[] = { 0x00 };
  277.     write_process(0x18cce7c + (client * 0x3980), H_ThirdPerson_t[client] ? bytesOn : bytesOff, sizeof(H_ThirdPerson_t[client] ? bytesOn : bytesOff));
  278.     iPrintln(client, Va("ThirdPerson: %s", H_ThirdPerson_t[client] ? "^2On" : "^1Off"));
  279. }
  280. BOOL H_LowFriction_t[18];
  281. void H_LowFriction(int client){
  282.     H_LowFriction_t[client] = !H_LowFriction_t[client];
  283.     char bytesOn[] = { 0x01 };
  284.     char bytesOff[] = { 0x00 };
  285.     write_process(0x110a28e + (client * 0x3980), H_LowFriction_t[client] ? bytesOn : bytesOff, sizeof(H_LowFriction_t[client] ? bytesOn : bytesOff));
  286.     iPrintln(client, Va("LowFriction: %s", H_LowFriction_t[client] ? "^2On" : "^1Off"));
  287. }
  288. BOOL H_AutoDropShot_t[18];
  289. void H_AutoDropShot(int client){
  290.     H_AutoDropShot_t[client] = !H_AutoDropShot_t[client];
  291.     char bytesOn[] = { 0x54 };
  292.     char bytesOff[] = { 0x00 };
  293.     write_process(0x110a28d + (client * 0x3980), H_AutoDropShot_t[client] ? bytesOn : bytesOff, sizeof(H_AutoDropShot_t[client] ? bytesOn : bytesOff));
  294.     iPrintln(client, Va("AutoDropShot: %s", H_AutoDropShot_t[client] ? "^2On" : "^1Off"));
  295. }
  296. BOOL H_DolphinDive_t[18];
  297. void H_DolphinDive(int client){
  298.     H_DolphinDive_t[client] = !H_DolphinDive_t[client];
  299.     char bytesOn[2] = { 0xFF, 0x00 };
  300.     char bytesOff[2] = { 0x00, 0x00 };
  301.     write_process(0x110A773 + (client * 0x3980), H_DolphinDive_t[client] ? bytesOn : bytesOff, sizeof(H_DolphinDive_t[client] ? bytesOn : bytesOff));
  302.     iPrintln(client, Va("DolphinDive: %s", H_DolphinDive_t[client] ? "^2On" : "^1Off"));
  303. }
  304. void H_KillAndScare(int client){
  305.     char Bytes[2] = { 0xFF, 0xFF };
  306.     write_process(0x110a2a4 + (client * 0x3980), Bytes, 2);
  307. }
  308. void H_TeleportToSky(int client){
  309.     char Bytes[] = { 0x46 };
  310.     write_process(0x110a2a4 + (client * 0x3980), Bytes, 1);
  311.     iPrintln(client, "^1Forgot Your Parachute?");
  312. }
  313. void H_TeleportToSpace(int client){
  314.     char Bytes[] = { 0x88 };
  315.     write_process(0x110a2a4 + (client * 0x3980), Bytes, 1);
  316.     iPrintln(client, "^1Where's your Jetpack when you need one?!");
  317. }
  318. void H_TeleportUnderMap(int client){
  319.     char Bytes[] = { 0x42 };
  320.     write_process(0x110a2a4 + (client * 0x3980), Bytes, 1);
  321.     iPrintln(client, "^1Don't Look Down!");
  322. }
  323. BOOL H_DisableWeaponPickup_t[18];
  324. void H_DisableWeaponPickup(int client){
  325.     H_DisableWeaponPickup_t[client] = !H_DisableWeaponPickup_t[client];
  326.     char bytesOn[] = { 0x01 };
  327.     char bytesOff[] = { 0x00 };
  328.     write_process(0x110A280 + (client * 0x3980) + 0x375, H_DisableWeaponPickup_t[client] ? bytesOn : bytesOff, sizeof(H_DisableWeaponPickup_t[client] ? bytesOn : bytesOff));
  329.     iPrintln(client, Va("DisableWeaponPickup: %s", H_DisableWeaponPickup_t[client] ? "^2On" : "^1Off"));
  330. }
  331. BOOL H_LastStandRevive_t[18];
  332. void H_LastStandRevive(int client){
  333.     H_LastStandRevive_t[client] = !H_LastStandRevive_t[client];
  334.     char bytesOn[] = { 0x01 };
  335.     char bytesOff[] = { 0x00 };
  336.     write_process(0x110A280 + (client * 0x3980) + 0x38FB, H_LastStandRevive_t[client] ? bytesOn : bytesOff, sizeof(H_LastStandRevive_t[client] ? bytesOn : bytesOff));
  337.     iPrintln(client, Va("LastStandRevive: %s", H_LastStandRevive_t[client] ? "^2On" : "^1Off"));
  338. }
Advertisement
RAW Paste Data Copied
Advertisement