YashasSamaga

Untitled

Aug 9th, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. static PWarningCount[MAX_PLAYERS char];
  2.  
  3. if(PlayerInfo[hitid][AFK]) return 1;
  4.  
  5. WeaponInfo[playerid][bullets_hit]++;
  6. if(IsPlayerInAnyVehicle(playerid) || IsPlayerInAnyVehicle(hitid)) return 1;
  7. if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID && GetPlayerSurfingVehicleID(hitid) != INVALID_VEHICLE_ID) return 1;
  8.  
  9. new Float:sX,Float:sY,Float:sZ;
  10. GetPlayerLastShotVectors(playerid,fX,fY,fZ,sX,sY,sZ);
  11. GetPlayerPos(hitid,fX,fY,fZ);
  12.  
  13. new Float:dev = (VectorSize(px-fX,py-fY,pz-fZ) - VectorSize(px-sX,py-sY,pz-sZ));
  14. if(dev > 25.0)
  15. {
  16. if(++PWarningCount{playerid} > 4)
  17. {
  18. PWarningCount{playerid} = 0;
  19. format(str,sizeof(str), "[SERVER]: %s(%d) possible proaim. (Deviation: %f)", PlayerInfo[playerid][Name], playerid, dev);
  20. SendAdminMessage(str, 0xD10000AA, 1);
  21. }
  22. }
  23. else PWarningCount{playerid} = 0;
Advertisement
Add Comment
Please, Sign In to add comment