Count down with GameTextForPlayer
#2

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;
           }
     }
}
Reply


Messages In This Thread
Count down with GameTextForPlayer - by Lidor124 - 21.09.2013, 20:22
Re: Count down with GameTextForPlayer - by Vanter - 21.09.2013, 21:00
Re: Count down with GameTextForPlayer - by Lidor124 - 22.09.2013, 09:21

Forum Jump:


Users browsing this thread: 1 Guest(s)