20.07.2009, 07:02
Quote:
|
Originally Posted by <__Ǝthan__>
make a var indexed to every player, for example:
Код:
new SpamCheck[MAX_PLAYERS]; Код:
//OnGameModeInit:
SetTimer("AntiSpam",5000,1); // occurs every 5 seconds
Код:
//OnPlayerCommandText:
SpamCheck[playerid] ++;
// and to stop the spam:
if(SpamCheck[playerid] > 5)
{
SendClientMessage(playerid, COLOR, "DONT SPAM!!!!");
return 0;
}
Код:
//OnPlayerText:
SpamCheck[playerid] ++;
if(SpamCheck[playerid] > 5)
{
SendClientMessage(playerid, COLOR, "DONT SPAM!!!!");
return 0;
}
Код:
public AntiSpam()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
SpamCheck[playerid] --;
}
}
you can of curse change it to how you want. |

