21.09.2013, 21:00
So now you create a timer for every second
pawn Код:
new RobbedBank[MAX_PLAYERS];
//OnGameModeInIt
//OneSecond
SetTimer("OneSecond",1000,1);
forward OneSecond()
public OneSecond()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
//Add when someone robs something, RobbedBank[playerid] =100; //100 seconds for an example
if(RobbedBank[i] > 1)
{
//Timer
format(string,sizeof(string),"%d ~g~remaining",RobbedBank[i]);
GameTextForPlayer(i, string,2000,5);
RobbedBank[i] --;
}
if(RobbedBank[i] == 1)
{
//Give the cash here.
RobbedBank[i] =0;
}
}
}