SA-MP Forums Archive
[Help] Zcmd problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Zcmd problem (/showthread.php?tid=262437)



[Help] Zcmd problem - Oddie - 18.06.2011

hi guys,

i making my gm e appers the bug: the OnPlayerCommandPerformed don't return false!

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
    {
        SendClientMessage(playerid,-1, "This command do not exist's, use /ajuda");
        return true;
    }
    if(IsPlayerFlooding(SpamTime[playerid], 5000))
    {
        SendClientMessage(playerid, 0xAA3333AA,"[ERROR]: Pleaze, don't make spam... ( 5 seconds )");
        return 0;
    }
    SpamTime[playerid] = GetTickCount();
    return 1;
}
stock IsPlayerFlooding(varflod, time)
{
    if(GetTickCount() - varflod < time) return true;
    return 0;
}

thanks.