Advertisement
Guest User

[TUT]adaptando um AntiFake Kill no GameMode

a guest
Dec 23rd, 2012
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. Seguinte, no topo do GM você vai colocar a variável
  2.  
  3. new antifakekill[MAX_PLAYERS];
  4.  
  5.  
  6. Logo após, na sua public OnPlayerText(playerid, text[]) você coloca esta função
  7.  
  8. if(strfind(text,"!kill",true) == 0) return Kick(playerid);
  9. if(strfind(text,"www.samphax.tk",true) == 0) return Kick(playerid);
  10.  
  11. Na public OnPlayerDeath(playerid, killerid, reason) você coloca isso
  12.  
  13. antifakekill[playerid] ++;
  14. SetTimerEx("antifakekill2", 1000,false,"i",playerid);
  15.  
  16. No final do GM você coloca esta callback
  17.  
  18. forward antifakekill2(playerid);
  19. public antifakekill2(playerid)
  20. {
  21.     antifakekill[playerid] --;
  22.     if(antifakekill[playerid] > 5)
  23.     {
  24.         SendClientMessage(playerid, 0xFF0000AA, "Este servidor esta protegido por um Anti Fake Kill criado por: luizfel2 (Fórum ChuckSamp Owna!)");
  25.         Kick(playerid);
  26.     }
  27.     return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement