Bank anti-rob timer.
#3

pawn Код:
new RobTimer[MAX_PLAYERS];

    if (strcmp("/rob", cmdtext, true) == 0)
    {
        if[RobTimer[playerid] == 0)
        {
            RobTimer[playerid] = 1;
            SetTimerEx("CanRobAgain",30*60000,false,"i",playerid);
            //    Rest of your code goes here (GivePlayerMoney, etc)
        }
        else
        {
            SendClientMessage(playerid,0xFFFFFFFF, "You have to wait 30 minutes to rob again.");
        }
        return 1;
    }

forward CanRobAgain (i);
public CanRobAgain (i)
{
    RobTimer[i] = 0;
    SendClientMessage(i, 0xFFFFFFFF, "You can now rob again.");
    return 1;
}
Reply


Messages In This Thread
Bank anti-rob timer. - by Kapone21 - 01.08.2013, 11:41
Re: Bank anti-rob timer. - by RajatPawar - 01.08.2013, 11:47
Re: Bank anti-rob timer. - by Amel_PAtomAXx - 01.08.2013, 12:13
Re: Bank anti-rob timer. - by Kapone21 - 01.08.2013, 14:13
Re: Bank anti-rob timer. - by PrinceKumar - 01.08.2013, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)