saving timer
#5

Don't use the timer.

Create another entry in your enum and use the gettime() + 400 function to save the time plus your desired waiting time (400 in this case) when the player issues the command.

Before the command's functions, make a conditional statement to check if the variable of the player is equal or bigger than the actual gettime() and let the functions execute if the player complies with the requirements.

For saving it just do the same as other integer variables in your PlayerSave function.

The structure would look like this:

PHP код:
yourcommand
{
    
check if player variable is NOT over gettime(), then return something;
    
robbing functions;
    
set the player variable to = gettime() + 400;
    return 
1;
} 
Reply


Messages In This Thread
saving timer - by astanalol - 22.03.2017, 22:51
Re: saving timer - by astanalol - 23.03.2017, 09:35
Re: saving timer - by Runn3R - 23.03.2017, 17:48
Re: saving timer - by astanalol - 24.03.2017, 00:23
Re: saving timer - by Toroi - 24.03.2017, 01:14
Re: saving timer - by astanalol - 24.03.2017, 03:59
Re: saving timer - by jasperschellekens - 24.03.2017, 05:58
Re: saving timer - by ATGOggy - 24.03.2017, 06:10
Re: saving timer - by astanalol - 24.03.2017, 11:06
Re: saving timer - by jasperschellekens - 24.03.2017, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)