Advertisement
Tustin

GTA V Clone Freeze Protection

Jun 8th, 2015
1,484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1.     void FreezeProtection()
  2.     {
  3.         int ped;
  4.         Vector3 c = GET_ENTITY_COORDS(_ID, 1);
  5.         if (GET_CLOSEST_PED(&c, 5, 1, 1, &ped, 0, 1, -1))
  6.         {
  7.             if (GET_ENTITY_MODEL(ped) == GET_ENTITY_MODEL(_ID))
  8.             {
  9.                 if (GET_PED_DRAWABLE_VARIATION(ped, Shirt) == GET_PED_DRAWABLE_VARIATION(_ID, Shirt) && GET_PED_TEXTURE_VARIATION(ped, Shirt) == GET_PED_TEXTURE_VARIATION(_ID, Shirt))
  10.                 {
  11.                     if (RequestLoop(ped))
  12.                     {
  13.                         if (DOES_ENTITY_EXIST(ped)){
  14.                             SET_ENTITY_AS_MISSION_ENTITY(ped, 0, 1);
  15.                             DELETE_PED(&ped);
  16.                             PrintMessage("Stopped freeze attempt");
  17.                         }
  18.                     }
  19.                 }
  20.             }
  21.         }
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement