28.04.2015, 19:06
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:
4) Now, you can make it work like this:
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;
PHP код:
OnPlayerConnect(playerid)
{
if( unbantime > gettime() ) return Kick(playerid);
return 1;
}