31.10.2012, 23:55
at the top
dont forget to add this
when player leave checkpoint.
pawn Код:
new bCount;
new BankCounter[MAX_PLAYERS] = 0;
pawn Код:
BankCounter[playerid] = SetTimerEx("BankCountDown",1000,false,"i",playerid); //add this when player attempt to rob the bank
pawn Код:
forward BankCountDown(playerid);
public BankCountDown(playerid)
{
bCount ++;
new string[120];
format(string, sizeof(string), "time left: %i", bCount);
GameTextForPlayer(playerid, string, 1000, 1);
if(bCount == 25)
{
SenClientMessage(playerid,-1,"You have successfully robbed the bank");
KillTimer(BankCounter[playerid]);
bCount = 0;
//and add here what will happen if he robbed the bank
}
pawn Код:
KillTimer(BankCounter[playerid]);
bCount = 0;