Advertisement
PaulCastellano

milan

Mar 26th, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
  2. {
  3. new string[128];
  4. if( weaponid <= 0 || weaponid > 46 )
  5. return Kick(playerid), 0;
  6. if(hittype != BULLET_HIT_TYPE_NONE) {
  7. if((fX <= -1000.0 || fX >= 1000.0) || (fY <= -1000.0 || fY >= 1000.0) || (fZ <= -1000.0 || fZ >= 1000.0) || ((hittype != BULLET_HIT_TYPE_PLAYER) && (hittype != BULLET_HIT_TYPE_VEHICLE) && (hittype != BULLET_HIT_TYPE_OBJECT) && (hittype != BULLET_HIT_TYPE_PLAYER_OBJECT))) {
  8. format(string, sizeof(string), "{F23A0D}[ANTICHEAT]: {FFFFFF}%s je kikovan zbog Weapon Crashera!", GetName(playerid));
  9. SendClientMessageToAll(CRVENA3, string);
  10. SCM(playerid, -1,"{F23A0D}[ANTICHEAT]: {FFFFFF} Izbaceni ste sa servera, razlog:Weapon Cheat!" );
  11. freeze[playerid] = SetTimerEx("KonektKick", 1000, 0, "d", playerid);
  12. return 0;
  13. }
  14. }
  15. if( hittype == BULLET_HIT_TYPE_PLAYER )
  16. {
  17. if( !( -20.0 <= fX <= 20.0 ) || !( -20.0 <= fY <= 20.0 ) || !( -20.0 <= fZ <= 20.0 ) )
  18. {
  19. format(string, sizeof(string), "{F23A0D}[ANTICHEAT]: {FFFFFF}%s je kikovan zbog Crashera!", GetName(playerid));
  20. SendClientMessageToAll(CRVENA3, string);
  21. SCM(playerid,-1, "{F23A0D}[ANTICHEAT]: {FFFFFF}Izbaceni ste sa servera, razlog: Crasher.");
  22. freeze[playerid] = SetTimerEx("KonektKick", 1000, 0, "d", playerid);
  23. return 0;
  24. }
  25. }
  26. return 1;
  27. }
  28.  
  29. //na vrh
  30. new crasher[MAX_PLAYERS char],
  31. crasherc[MAX_PLAYERS];
  32. onplayerconn
  33. crasher{playerid} = 0;
  34.  
  35. onplayerdisco
  36.  
  37. KillTimer(crasherc[playerid]);
  38.  
  39. onplayerstatechange
  40.  
  41. if(newstate == PLAYER_STATE_DRIVER)
  42. {
  43. if(crasher{playerid} == 1)
  44. {
  45. new string[128];
  46. format(string, sizeof(string),""CRVENA "[Admin] Igrac: %s je dobio kick zbog koristenja cheata!", GetName(playerid));
  47. AdminGameMaster(-1,string);
  48. Kick(playerid);
  49. }
  50. else if(crasher{playerid} == 0)
  51. {
  52. crasher{playerid} = 1;
  53. crasherc[playerid] = SetTimerEx("Crash", 1000, false, "i", playerid);
  54. }
  55. }
  56.  
  57. negdje na kraj
  58.  
  59. forward Crash(playerid);
  60. public Crash(playerid)
  61. {
  62. crasher{playerid} = 0;
  63. return 1;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement