tempban
#1

pawn Код:
public OnPlayerConnect(playerid)
{
    //getdate & gettime
    //get date & get time from file when he got banned
    if(CurrentDay >= DayBanned && CurrentMonth >= BannedMonth && CurrentYear >= BannedYear
    && CurrentHour >= HourBanned && CurrentMinute >= BannedMinute && CurrentSecond >= BannedSecond)
    {
        //unban
    }
    else
    {
        //still banned
    }
    return 1;
}
this dont work 100%

i got banned: 7.1.2012 - 20.45:00
and the ban expire in 1 minute when the date & time is: 7.1.2012 - 20:46:00

but when the time has passed 20:46:00 im still banned
Reply
#2

Just use Unix timestamps.

https://sampforum.blast.hk/showthread.php?tid=254915
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)