Need help with Chatbox [ READ Please!! ]
#3

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;
}
Reply


Messages In This Thread
Need help with Chatbot [ READ Please!! ] - by Neonwalker - 15.05.2012, 14:43
Re: Need help with Chatbox [ READ Please!! ] - by Neonwalker - 16.05.2012, 09:23
Re: Need help with Chatbox [ READ Please!! ] - by Lorenc_ - 16.05.2012, 11:47

Forum Jump:


Users browsing this thread: 2 Guest(s)