QuantumA

[SA-MP] Pawn Exploit Fix for Hittype

Nov 1st, 2015
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
  2. {
  3.     new Float:x, Float:y, Float:z;
  4.     GetPlayerPos(playerid, x, y, z);
  5.  
  6.     //Desync weapon IDs that don't fire bullets
  7.     if (weaponid < 22 || weaponid > 38)
  8.         return 0;      
  9.    
  10.     //Desync shots with Z pos out of bounds
  11.     if(!(-20000.0 <= z <= 20000.0))
  12.             return 0;  
  13.  
  14.     return 1;
  15. }
Add Comment
Please, Sign In to add comment