About Date and Time!
#2

99545432 = 9954532 seconds.

You can use timestamps for temporary systems like temporary banning, etc..

It works like this:
1) First, use gettime() and get the timestamp
2) If the player is getting banned for a day, we need to get the seconds in a day: 60 * 60 * 24 = 86400 seconds
3) now we'll add this to the timestamp, like this:
PHP код:
new unbantime=gettime()+86400
4) Now, you can make it work like this:
PHP код:
OnPlayerConnect(playerid)
{
    if( 
unbantime gettime() ) return Kick(playerid);
    return 
1;

Reply


Messages In This Thread
About Date and Time! - by NexTioN1230 - 28.04.2015, 18:36
Re: About Date and Time! - by ATGOggy - 28.04.2015, 19:06

Forum Jump:


Users browsing this thread: 1 Guest(s)