Help Timeleft
#1

Hello Guys Someone Can Help Me To Do Like This ?:



i Mean Timeleft Textdraw



Thanks
Reply
#2

Answer ?? ?? ??
Reply
#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
#4

Where i Put That ?
Reply
#5

Код:
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!
Reply
#6

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
Reply
#7

it doesn't work i want it like this:



Not Like a Countdown
Reply
#8

The picture says Time LEFT: 1:03..
That means it is a countdown.
Reply
#9

No is not the same
Reply
#10

Totaly Like This:

https://sampforum.blast.hk/showthread.php?tid=315337

ON The VIDEO
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)