10 minute timer.
#1

Ok, I am making a Robbery System into my script.

I want to know how Imake a 10 minute timer and when I do the command it says:

you have 10 minutes left before robbing a store again.

Then when a minute goes down E.G: 1 minute has passed.

you have 9 minutes left before robbing a store again.

and so on and so on

The command:

pawn Код:
CMD:robshop(playerid, params[])
{
    if(!IsAt247(playerid))
    {
        SendClientMessage(playerid, COLOR_GRAD2, "   You're not in a 24-7!");
        return 1;
    }
    else if(PlayerInfo[playerid][pWantedLevel] == 6)
    {
        SendClientMessage(playerid, COLOR_GRAD2, "  You're Most Wanted.");
        return 1;
    }
    else if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pFaction] == 2)
    {
        SendClientMessage(playerid, COLOR_GRAD2, "  You're a Law Enforcement Officer, you cannot rob the store..");
        return 1;
    }
    else if(RobTimer[playerid] > 0) {
        format(string, sizeof(string), "You must wait %d seconds before speaking again in this channel.", RobTimer[playerid]);
        SendClientMessage(playerid, COLOR_GREY, string);
        return 1;
    }
    PlayerInfo[playerid][pWantedLevel]++;
    SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
    SendClientMessage(playerid, COLOR_LIGHTRED, "You have comitted a crime, Robbery. (Reporter: CCTV)");
    return 1;
}
Reply


Messages In This Thread
10 minute timer. - by JordanDoughty - 24.07.2014, 16:43
Re: 10 minute timer. - by DaniceMcHarley - 24.07.2014, 16:44
Re: 10 minute timer. - by BroZeus - 24.07.2014, 16:58

Forum Jump:


Users browsing this thread: 1 Guest(s)