16.05.2012, 11:47
Try this:
pawn Код:
new p_AntiSpam[ MAX_PLAYERS ];
public OnPlayerText(playerid, text[])
{
if( ( ( GetTickCount( ) - p_AntiSpam[ playerid ] ) > 20000 )
{
if(!strcmp(text, "Ha", true) || !strcmp(text, "lol", true) || !strcmp(text, "rofl", true) || !strcmp(text, "lmao", true))
{
SendPlayerMessageToAll(playerid, text);
SendBotMessage("ROFL - COPTER");
p_AntiSpam[ playerid ] = GetTickCount( );
return 0;
}
if(!strcmp(text, "Hi", true) || !strcmp(text, "Sup", true) || !strcmp(text, "Sophie", true) || !strcmp(text, "Hiya", true))
{
SendPlayerMessageToAll(playerid, text);
Random(playerid);
p_AntiSpam[ playerid ] = GetTickCount( );
return 0;
}
}
return 1;
}