Help Timeleft
#3

pawn Код:
new timelefttimer[MAX_PLAYERS];
new timeleftsecs[MAX_PLAYERS];
forward TimeLeft(playerid);
public TimeLeft(playerid)
{
if(timeleftsecs[playerid] == 0)
{
//WHEN TIME LEFT IS 00:00
//WRITE HERE THE FUNCTIONS // ACTIONS YOU WANT TO MAKE
KillTimer(timelefttimer[playerid]);
}
else
{
new string[8];
format(string,sizeof(string),"~R~%d",timeleftsecs[playerid]);
GameTextForAll(string,1000,3);
}
timeleftsecs[playerid] = timeleftsecs[playerid] -1;
return 1;
}

//THEN YOU WILL ADD THESE TWO LINES WHERE YOU WANT TO CALL THE FUNCTION OF TIME LEFT
    timeleftsecs[playerid]=30; //30 seconds for example
    timelefttimer[playerid]=SetTimerEx("TimeLeft", 1000, true,"d",playerid);
Reply


Messages In This Thread
Help Timeleft - by samp_boy - 07.11.2013, 20:48
Re : Help Timeleft - by samp_boy - 07.11.2013, 21:18
Re: Help Timeleft - by NeMoK - 07.11.2013, 21:20
Re : Help Timeleft - by samp_boy - 08.11.2013, 07:40
Re: Help Timeleft - by TahaAsif12 - 08.11.2013, 08:24
Re: Help Timeleft - by Pottus - 08.11.2013, 08:29
Re : Help Timeleft - by samp_boy - 08.11.2013, 11:32
Re: Help Timeleft - by Kyance - 08.11.2013, 11:51
Re : Help Timeleft - by samp_boy - 08.11.2013, 12:12
Re : Help Timeleft - by samp_boy - 08.11.2013, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)