Banning by days
#3

Convert the amount of days into a unix timestamp format, and then when a player tries to connect check if the timestamp has passed.

See,
https://sampforum.blast.hk/showthread.php?tid=164359
https://sampforum.blast.hk/showthread.php?tid=496063
Hint:
This should convert it into a timestamp.
new datestamp = gettime() + date*86400;

For example, if the date is 1 day then it would simply be 86400. And the timestamp would simply be the current timestamp plus a day. To check if the ban has passed you'd do something like this:
pawn Код:
if(unbantime > gettime())
Reply


Messages In This Thread
Banning by days - by LeXuZ - 16.11.2014, 16:02
Re: Banning by days - by LeXuZ - 16.11.2014, 19:19
Re: Banning by days - by Abagail - 16.11.2014, 19:25

Forum Jump:


Users browsing this thread: 1 Guest(s)