Advertisement
Guest User

Untitled

a guest
Aug 7th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
  2. {
  3. if( hittype != BULLET_HIT_TYPE_NONE ) // Bullet Crashing uses just this hittype
  4. {
  5. if( !( -1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0 ) ) // a valid offset, it's impossible that a offset bigger than 1000 is legit (also less than -1000.0 is impossible, not used by this hack, but still, let's check for it, just for the future, who knows what hacks will appear). The object with biggest offset is having ~700-800 radius.
  6. {
  7. GetPlayerName(playerid, sendername, sizeof(sendername));
  8. format(string, sizeof(string), "%s (ID: %) try to crash players, fuck his mother.", sendername, playerid);
  9. submitToAdmins(string, COLOR_RED);
  10. submitToHelpers(string, COLOR_RED);
  11. return 0; // let's desynchronize that bullet, so players won't crash
  12. }
  13. }
  14. if(weaponid == 24)
  15. {
  16. if((gettime() - shotTime[playerid]) < 1)
  17. {
  18. shot[playerid] += 1;
  19. }
  20. else
  21. {
  22. shot[playerid] = 0;
  23. }
  24. if(shot[playerid] > 10)
  25. {
  26. format(string,sizeof(string),"{f03337}Warning: %s(%d) it is possible to use rapid fire.",GetName(playerid),playerid);
  27. submitToAdmins(string, COLOR_RED);
  28. KickEx(playerid);
  29. }
  30. shotTime[playerid] = gettime();
  31. }
  32. return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement