SHARE
TWEET

Anti Car Spam

a guest Apr 11th, 2012 444 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Coded by Koma
  2. #include <a_samp>
  3. public OnFilterScriptInit()
  4. {
  5.     print("Anti Car Spam by Koma loaded.");
  6.     return 1;
  7. }
  8. #define SCM SendClientMessage
  9. new xacalaca[MAX_PLAYERS];
  10. public OnPlayerStateChange(playerid, newstate, oldstate)
  11. {
  12.     xacalaca[playerid] ++;
  13.     SetTimerEx("desxacalaca", 1000,false,"i",playerid);
  14.     return 1;
  15. }
  16. forward desxacalaca(playerid);
  17. public desxacalaca(playerid)
  18. {
  19.     xacalaca[playerid] --;
  20.     if(xacalaca[playerid] > 10)
  21.     {
  22.         new bibi[128], Nome[MAX_PLAYER_NAME];
  23.         SCM(playerid, -1, "Este servidor está protegido pelo sistema Kocars e você foi banido por spam de veículos");
  24.         GetPlayerName(playerid, Nome, sizeof(Nome));
  25.         format(bibi, sizeof(bibi), "[Koprotect]: %s foi banido pelo uso do mod cleo 4 car spam.", Nome);
  26.         SendClientMessageToAll(-1, bibi);
  27.         Ban(playerid);
  28.     }
  29.     //printf("xacalaca = %d", xacalaca[playerid]); // debug
  30.     return 1;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top