Guest User

Anti Fake Kill | www.samp-destek-sitesi.tr.gg

a guest
Sep 7th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define CEZASI_NEOLSUN // 1 = BAN - 2 = KICK (DEFAULT: BAN)
  4.  
  5. new f_kill[MAX_PLAYERS] = INVALID_PLAYER_ID;
  6.  
  7. public OnPlayerConnect(playerid)
  8. {
  9. f_kill[playerid] = INVALID_PLAYER_ID; // Başlangıçta zaten geçersiz id olarak tanımladık fakat oyuncu çıktığında değişkenin farklı id adresini kaydetmesine karşı bir önlem aldık sadece.
  10. return 1;
  11. }
  12.  
  13. public OnPlayerDeath(playerid)
  14. {
  15. if(killerid != INVALID_PLAYER_ID && f_kill[playerid] != killerid)
  16. {
  17. // Oyuncunun hile olduğu ortaya çıkınca olacaklar
  18. #if CEZASI_NEOLSUN == 1
  19. BanEx(playerid, "Fake Kill");
  20. #else if CEZASI_NEOLSUN == 2
  21. Kick(playerid);
  22. #endif
  23. }
  24. return 1;
  25. }
  26.  
  27. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  28. {
  29. if(issuerid != INVALID_PLAYER_ID)
  30. {
  31. f_kill[playerid]= issuerid;
  32. }
  33. return 1;
  34. }
Add Comment
Please, Sign In to add comment