Guest User

Ant Fake Kill by Mandrack_FreeZe

a guest
Sep 13th, 2014
648
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.07 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4.  
  5. #if defined FILTERSCRIPT
  6. //Variavel & Forwards
  7. new PLDano[MAX_PLAYERS];
  8.  
  9. forward SetVarHealth(playerid);
  10. forward ResetFKill(playerid);
  11. //====================
  12. public OnFilterScriptInit()
  13. {
  14.     print("\n---------------------------------------------");
  15.     print(" Anti Fake-Kill by Mandrack_FreeZe - ATIVADO");
  16.     print("-----------------------------------------------\n");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     print("\n---------------------------------------------");
  23.     print(" Anti Fake-Kill by Mandrack_FreeZe - DESATIVADO");
  24.     print("-----------------------------------------------\n");
  25.     return 1;
  26. }
  27.  
  28. #else
  29.  
  30. #endif
  31.  
  32. public OnPlayerConnect(playerid)
  33. {
  34.     PLDano[playerid] = 0;
  35.     return 1;
  36. }
  37.  
  38. public OnPlayerDisconnect(playerid, reason)
  39. {
  40.     PLDano[playerid] = 0;
  41.     return 1;
  42. }
  43.  
  44. public OnPlayerSpawn(playerid)
  45. {
  46.     PLDano[playerid] = 0;
  47.     return 1;
  48. }
  49.  
  50. public OnPlayerDeath(playerid, killerid, reason)
  51. {
  52.     if(playerid != killerid && reason != 255)
  53.     {
  54.         if(PLDano[playerid] == 0)
  55.         {
  56.             new string[50], pName[MAX_PLAYER_NAME];
  57.             GetPlayerName(playerid,pName,sizeof(pName));
  58.             format(string, sizeof(string),"%s[ID:%d] foi banido. (Fake-Kill)", pName, playerid);
  59.             SendClientMessageToAll(-1, string);
  60.             Ban(playerid);
  61.             SetTimerEx("ResetFKill", 5000, false, "d", killerid);
  62.         } else
  63.         {
  64.             PLDano[playerid] = 0;
  65.             return 1;
  66.         }
  67.     }
  68.     return 1;
  69. }
  70.  
  71. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  72. {
  73.     new Float:pVida;
  74.     GetPlayerHealth(playerid, pVida);
  75.     PLDano[playerid] = 1;
  76.     if(pVida > 0)
  77.     {
  78.         SetTimerEx("SetVarHealth", 300,false, "d", playerid);
  79.     }
  80.  
  81.     return 1;
  82. }
  83.  
  84. public SetVarHealth(playerid)
  85. {
  86.     PLDano[playerid] = 0;
  87.     return 1;
  88. }
  89.  
  90. public ResetFKill(playerid)
  91. {
  92.     SetPlayerWantedLevel(playerid, 0);
  93.     SendClientMessage(playerid,-1, "Seu nível de procurado foi resetado pela suspeita de Fake-Kill.");
  94.     return 1;
  95. }
  96. //Sistema criado por Mandrack_FreeZe
  97. //Não retire os créditos!
Add Comment
Please, Sign In to add comment