Anti spam for PM [help][reps]
#2

This methods would work for all kinds of spam.

pawn Код:
if(GetPVarInt(playerid, "lastcommand") > GetTickCount())
{
    SendClientMessage(playerid, 0x00FFFFFF, "Slow it down on the commands!");
    SetPVarInt(playerid, "lastcommand", GetTickCount()+500);
    return 1;
}

SetPVarInt(playerid, "lastcommand", GetTickCount()+500);
Put that either in OnPlayerCommandText (for all the commands) or at the PM command.
Reply


Messages In This Thread
Anti spam for PM [help][reps] - by MahdiGames - 01.02.2014, 05:52
Re: Anti spam for PM [help][reps] - by CuervO - 01.02.2014, 05:57
Re: Anti spam for PM [help][reps] - by MahdiGames - 01.02.2014, 06:01
Re: Anti spam for PM [help][reps] - by CuervO - 01.02.2014, 06:12
Re: Anti spam for PM [help][reps] - by MahdiGames - 01.02.2014, 06:22
Re: Anti spam for PM [help][reps] - by CuervO - 01.02.2014, 06:29

Forum Jump:


Users browsing this thread: 1 Guest(s)