Detecting if timer "LOLZ" has been started :D
#1

I need to know how can i detect if my script already started a Timer called "LOLZ" Which function should i use?
Reply
#2

Use variables

pawn Код:
//ontop
new
    bool:g_LOLZStarted;
pawn Код:
//where you start the timer
SetTimer( ... ) //this is LOLZ
g_LOLZStarted = true;
To check, do:
pawn Код:
if( g_LOLZStarted ) //is started
{
    //stuff
}
else
{
    //other stuff
}
Reply
#3

Well you could just create a global variable at the top of your script
Код:
new LOL_Started;
And when you SetTimer(Ex), set its value to 1.
Once the timer ends or when you KillTimer(), set LOL_Started's value back to 0.

Then you can check if it's started by doing
Код:
if(LOL_Started==1)
EDIT: LOL, just noticed someone before me posted the same thing xD
Reply
#4

Thanks guys
Reply
#5

Quote:
Originally Posted by sekol
Посмотреть сообщение
Thanks guys
Np happy to have helped you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)