Countdown for specific player while some condition is ture
#1

I making a robbery game.
Showcountdown until a condition is ture. If condition go false hide countdown and reset it.
Reply
#2

Just take your countdown timer and add that condition ? shouldn't be to difficult

Something like that I guess should work
PHP код:
if(condition is not truecountdown START_VALUE
Show us what you did so far
Reply
#3

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Just take your countdown timer and add that condition ? shouldn't be to difficult

Something like that I guess should work
PHP код:
if(condition is not truecountdown START_VALUE
Show us what you did so far
if (Capturing[playerid] == true)
{
//Show counter with textdraw
}
if (Capturing[playerid] == false)
{
//hide textdraw && counter = STARTVALUE
}

please help
Reply
#4

Where do you have that code is that in a timer?
PHP код:
if(Capturing[playerid] == true)
{
// Show counter with textdraw
// counter--;
// update textdraw
// if(counter == 0) // do something
}
else
{
// hide textdraw
// counter = STARTVALUE

If this isn't in a timer how does Capturing[playerid] gets updated ?

I am not sure how to help you, you already got most parts of the code
Reply
#5

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Where do you have that code is that in a timer?
PHP код:
if(Capturing[playerid] == true)
{
// Show counter with textdraw
// counter--;
// update textdraw
// if(counter == 0) // do something
}
else
{
// hide textdraw
// counter = STARTVALUE

If this isn't in a timer how does Capturing[playerid] gets updated ?

I am not sure how to help you, you already got most parts of the code
Bro just tell me a example how to set a Float to textdraw.
Reply
#6

A float to a textdraw?
PHP код:
new string[32];
format(stringsizeof string"%f"5.5);
TextDrawSetString(textdrawstring); 
Reply


Forum Jump:


Users browsing this thread: