tempban - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: tempban (
/showthread.php?tid=309464)
tempban - Unknown123 - 07.01.2012
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
Re: tempban -
Scenario - 07.01.2012
Just use Unix timestamps.
https://sampforum.blast.hk/showthread.php?tid=254915