Dateban, checking date - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dateban, checking date (
/showthread.php?tid=265771)
Dateban, checking date -
steki. - 02.07.2011
Well, I'm in need of some help to check if the date is overpassed with another date. The DB gives the date to be unbanned and pawn gives the current date.
So, here's the code.
PHP код:
if( (sDay == uDay && sMonth == uMonth && sYear == uYear) || ( sDay >= uDay && sMonth == uMonth && sYear == uYear) || (sMonth >= uMonth && sYear >= uYear) || (sYear > uYear) )
{
format( query , 256 , "UPDATE `recordinfo` SET `lifted`=1, `liftreason`='Ban Expirado' WHERE `cid`=%d AND `index`=%d" , playerInfo[playerid][pCid] , r );
mysql_query( query );
continue;
}
I've been testing the 'if' and I put the unban date 2013/10/10 but it doesn't Kick the player.
Re: Dateban, checking date -
Calgon - 02.07.2011
https://sampforum.blast.hk/showthread.php?tid=254915