How to: Detection?
#7

Quote:
Originally Posted by Lynn
View Post
Create a PVar, looped through a timer.
Once the timer is done, Delete the Pvar.
And in the command simply check if it equals 1, and if it doesn't then allow the command to go through.
Because if it does equal 1, it means the PVar hasn't been deleted yet so it's been less then 1 minute.
Or just use simple math?

pawn Code:
UsedCmd[playerid] = gettime();

// Then check if 1 minute has passed or not

if(gettime() - UsedCmd[playerid] < 60)
{
    // 1 Minute didn't pass
}
else
{
    // 1 minute passed
}
Reply


Messages In This Thread
How to: Detection? - by lexurs - 20.05.2014, 21:58
Re: How to: Detection? - by Lynn - 20.05.2014, 23:10
Re: How to: Detection? - by lexurs - 20.05.2014, 23:23
Re: How to: Detection? - by K9IsGodly - 20.05.2014, 23:36
Re: How to: Detection? - by lexurs - 20.05.2014, 23:38
Re: How to: Detection? - by Lynn - 20.05.2014, 23:52
Re: How to: Detection? - by arakuta - 20.05.2014, 23:57
Re: How to: Detection? - by lexurs - 21.05.2014, 00:05
Re: How to: Detection? - by Lynn - 21.05.2014, 00:20

Forum Jump:


Users browsing this thread: 3 Guest(s)