Anti text spam
#8

pawn Код:
new pLastMsg[MAX_PLAYERS][129 char];

public OnPlayerConnect(playerid)
{
    pLastMsg[playerid] = !"fghsfhdf";
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if(!strcmp(text, pLastMsg[playerid], true))
    {
        //Have wrote the same message
        //Do something
        //return 0; to prevent sending the message
    }
    strpack(pLastMsg[playerid], text, sizeof(pLastMsg[]));
    return 1;
}
Reply


Messages In This Thread
Anti text spam - by iLearner - 20.08.2016, 14:02
Re: Anti text spam - by Shinja - 20.08.2016, 14:15
Re: Anti text spam - by iLearner - 20.08.2016, 14:44
Re: Anti text spam - by SyS - 20.08.2016, 14:53
Re: Anti text spam - by oMa37 - 20.08.2016, 14:59
Re: Anti text spam - by Affan - 20.08.2016, 15:05
Re: Anti text spam - by Shinja - 20.08.2016, 15:20
Re: Anti text spam - by Jefff - 20.08.2016, 15:21
Re: Anti text spam - by iLearner - 21.08.2016, 10:43
Re: Anti text spam - by Shinja - 21.08.2016, 12:59

Forum Jump:


Users browsing this thread: 3 Guest(s)