24.07.2014, 16:43
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:
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;
}