Help Timeleft - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Timeleft (
/showthread.php?tid=474383)
Help Timeleft -
samp_boy - 07.11.2013
Hello Guys Someone Can Help Me To Do Like This ?:
i Mean Timeleft Textdraw
Thanks
Re : Help Timeleft -
samp_boy - 07.11.2013
Answer ?? ?? ??
Re: Help Timeleft -
NeMoK - 07.11.2013
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);
Re : Help Timeleft -
samp_boy - 08.11.2013
Where i Put That ?
Re: Help Timeleft -
TahaAsif12 - 08.11.2013
Код:
new timelefttimer[MAX_PLAYERS];
new timeleftsecs[MAX_PLAYERS];
Hmm, i think on top of ur script under defines
Код:
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);
Anywhere is ur script!
Hope i helped!
Re: Help Timeleft -
Pottus - 08.11.2013
Don't forget to use the timer fix other wise your count down clock's accuracy will be shitty.
https://sampforum.blast.hk/showthread.php?tid=289675
Re : Help Timeleft -
samp_boy - 08.11.2013
it doesn't work

i want it like this:
Not Like a Countdown
Re: Help Timeleft -
Kyance - 08.11.2013
The picture says Time
LEFT: 1:03..
That means it is a countdown.
Re : Help Timeleft -
samp_boy - 08.11.2013
No is not the same
Re : Help Timeleft -
samp_boy - 08.11.2013
Totaly Like This:
https://sampforum.blast.hk/showthread.php?tid=315337
ON The VIDEO