Advertisement
zRayzHaze

Unfair Aimbot All Call of Duty Source code sprx

Dec 11th, 2022 (edited)
1,174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.61 KB | Source Code | 0 0
  1. //Please donate im gonna be a daddy!
  2. //Know i wrote 60% of this using my phone so lmk any things
  3. //Skype zRayz-
  4. //give proper credits if you use this in your projects
  5. //dont use any mods online dont ruin other player experience.
  6. //Game AW T.U 1.20
  7. //Other credits S63 <3, shark, ngu, se7ensins!!!!!!
  8. //Note i will not give to you the other things you meed as if you are a modder/coder you will be able to make all the things work,you only need few things to add ti your project easy asf.
  9.  
  10. //Place in Structures.h
  11.  
  12. #define SPAREMEMORY 0x2100050
  13. #define TOC 0x9D5530
  14. const int MaxClients = 12;
  15.  
  16. enum meansOfDeath_t {
  17.     MOD_UNKNOWN = 0x0,
  18.     MOD_PISTOL_BULLET = 0x1,
  19.     MOD_RIFLE_BULLET = 0x2,
  20.     MOD_EXPLOSIVE_BULLET = 0x3,
  21.     MOD_GRENADE = 0x4,
  22.     MOD_GRENADE_SPLASH = 0x5,
  23.     MOD_PROJECTILE = 0x6,
  24.     MOD_PROJECTILE_SPLASH = 0x7,
  25.     MOD_MELEE = 0x8,
  26.     MOD_MELEE_ALT = 0x9,
  27.     MOD_HEAD_SHOT = 0xA,
  28.     MOD_MELEE_DOG = 0xB,
  29.     MOD_MELEE_ALIEN = 0xC,
  30.     MOD_CRUSH = 0xD,
  31.     MOD_FALLING = 0xE,
  32.     MOD_SUICIDE = 0xF,
  33.     MOD_TRIGGER_HURT = 0x10,
  34.     MOD_EXPLOSIVE = 0x11,
  35.     MOD_IMPACT = 0x12,
  36.     MOD_ENERGY = 0x13,
  37.     MOD_NUM = 0x14,
  38. };
  39.  
  40. enum hitLocation_t {
  41.     HITLOC_NONE = 0x0,
  42.     HITLOC_HELMET = 0x1,
  43.     HITLOC_HEAD = 0x2,
  44.     HITLOC_NECK = 0x3,
  45.     HITLOC_TORSO_UPR = 0x4,
  46.     HITLOC_TORSO_LWR = 0x5,
  47.     HITLOC_R_ARM_UPR = 0x6,
  48.     HITLOC_L_ARM_UPR = 0x7,
  49.     HITLOC_R_ARM_LWR = 0x8,
  50.     HITLOC_L_ARM_LWR = 0x9,
  51.     HITLOC_R_HAND = 0xA,
  52.     HITLOC_L_HAND = 0xB,
  53.     HITLOC_R_LEG_UPR = 0xC,
  54.     HITLOC_L_LEG_UPR = 0xD,
  55.     HITLOC_R_LEG_LWR = 0xE,
  56.     HITLOC_L_LEG_LWR = 0xF,
  57.     HITLOC_R_FOOT = 0x10,
  58.     HITLOC_L_FOOT = 0x11,
  59.     HITLOC_GUN = 0x12,
  60.     HITLOC_SHIELD = 0x13,
  61.     HITLOC_ARMOR = 0x14,
  62.     HITLOC_SOFT = 0x15,
  63.     HITLOC_NUM = 0x16,
  64. };
  65.  
  66. //Place them in Functions.cpp
  67.  
  68. int player_die_t[2] = { player_die_a, TOC };//player_die_a is your address
  69.  
  70. opd_s ParseAddr(int Address) {
  71.     opd_s GLS = { Address, TOC };
  72.     return GLS;
  73. }
  74. //function to call the player die
  75. void player_die(gentity_s* self, gentity_s* inflictor, gentity_s* attacker, int damage, meansOfDeath_t meansOfDeath, int iWeapon, float* vDir, hitLocation_t hitLoc, int psTimeOffset) {
  76.     void(*player_die)(gentity_s* self, gentity_s* inflictor, gentity_s* attacker, int damage, meansOfDeath_t meansOfDeath, int iWeapon, float* vDir, hitLocation_t hitLoc, int psTimeOffset) = (void(*)(gentity_s*, gentity_s*, gentity_s*, int, meansOfDeath_t, int, float*, hitLocation_t, int))&player_die_t;
  77.     player_die(self, inflictor, attacker, damage, meansOfDeath, iWeapon, vDir, hitLoc, psTimeOffset);
  78. }
  79. //Function to call player die
  80. void KillPlayer(gentity_s* attacker, gentity_s* inflictor) {
  81.     player_die(inflictor, attacker, attacker, 0x186A0, MOD_HEAD_SHOT, WEAPTYPE_BULLET, 0, HITLOC_NONE, 0);//function player die
  82. }
  83.  
  84. //You cannot call player_die or g_damage without adding in a VM_Notify hook or a Scr_Notifyhook so by placing this nonitor in the threadhooked you will call player_die when you shoot with your weap, you need few things more to get all working but I gave you the 90% of all you need the rest is yours, this can be ported on all cods, and obv is PS3 only.
  85. Pls donate :) link to donate in my pastebin
  86.  
  87. //Place this where is placed your Hook
  88. Like UnfairMonitor(yourClient, entityIndex, notifyString);
  89.  
  90. void UnfairMonitor(int clientNum, int entityNum, const char* notifyString)
  91. {
  92.     int clientIndex = getHostClientNumber();//host only way
  93.     int EnemyTarget = GetNearestPlayer(clientIndex);
  94.            if(compareNotifyString(notifyString, "weapon_fired", clientIndex, entityNum) && ClientInfo[clientIndex].Unfair == true)
  95.            {
  96.                 //SetViewAngles(clientIndex);
  97.                 KillPlayer(&entity[clientIndex], &entity[EnemyTarget]);
  98.            }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement