Advertisement
RiccB

Anti Cheat - FIX

Nov 1st, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. new bool:duzus[MAX_VEHICLES];
  2.  
  3.  
  4. stock IsPlayerNearPNS(playerid)
  5. {
  6. if(IsPlayerInRangeOfPoint(playerid,15,-1904.4613,284.3640,41.0469)) return 1; // pns wang
  7. if(IsPlayerInRangeOfPoint(playerid,15,2393.9219,1490.0908,10.6417)) return 1; // near casino
  8. if(IsPlayerInRangeOfPoint(playerid,15,1025.0333,-1024.4900,32.1016)) return 1; // tample
  9. if(IsPlayerInRangeOfPoint(playerid,15,487.4272,-1740.6165,11.1334)) return 1; // santa
  10. if(IsPlayerInRangeOfPoint(playerid,15,1976.1138,2162.2119,11.0703)) return 1; // red east
  11. if(IsPlayerInRangeOfPoint(playerid,15,-2425.7561,1021.0601,50.3977)) return 1; // juniper
  12. if(IsPlayerInRangeOfPoint(playerid,15,2064.3638,-1831.4796,13.5469)) return 1; // idlewood
  13. if(IsPlayerInRangeOfPoint(playerid,15,-100.0151,1117.9094,19.7417)) return 1; // FC
  14. if(IsPlayerInRangeOfPoint(playerid,15,-1420.4873,2584.8186,55.8433)) return 1; // El Quarabos
  15. if(IsPlayerInRangeOfPoint(playerid,15,719.9288,-458.2310,16.3359)) return 1; // El Quarabos
  16. return 0;
  17. }
  18.  
  19. stock ACFix(playerid,vehicleid)
  20. {
  21. new Float:hp;
  22. GetVehicleHealth(vehicleid,hp);
  23. if(IsPlayerInVehicle(playerid,vehicleid) && hp < 999 && duzus[vehicleid]==false) duzus[vehicleid] = true;
  24. if(!IsPlayerInVehicle(playerid,vehicleid)) return 0;
  25. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
  26. if(duzus[vehicleid]==false) return 0;
  27. if(hp != 1000) return 0;
  28. if(IsPlayerNearPNS(playerid)) return 0;
  29. duzus[vehicleid]=false;
  30. SetTimerEx("KickFixer",500,0,"i",playerid);
  31. return 1;
  32. }
  33.  
  34. forward KickFixer(playerid);
  35. public KickFixer(playerid)
  36. {
  37. new zin[114],name[21];
  38. GetPlayerName(playerid,name,21);
  39. format(zin,114,"[KICK] %s išmestas iš serverio dėl nelegalių programų naudojimo (FIX).",name);
  40. SendClientMessageToAll(0xA52A2AAA,zin);
  41. SendClientMessage(playerid,0xff0000ff,"Buvote išmestas iš serverio dėl nelegalių programų naudojimo.{ffffff} Jei tai įvyko per klaidą, prašome susisiekti su administracija.");
  42. print(zin);
  43. Kick(playerid);
  44. return 1;
  45. }
  46.  
  47.  
  48. public OnPlayerUpdate(playerid)
  49. {
  50. if(IsPlayerInAnyVehicle(playerid))
  51. {
  52. if(IsPlayerNearPNS(playerid)) duzus[GetPlayerVehicleID(playerid)]=false;
  53. ACFix(playerid,GetPlayerVehicleID(playerid));
  54. }
  55. return 1;
  56. }
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. /*
  64. NAUDOJIMAS :
  65.  
  66. Automobilio sutaisymo komandoje naudot duzus[vehicleid] = false ir atstatyt automobilio gyvybes.
  67.  
  68.  
  69. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement