31.12.2018, 14:12
Quote:
Don't use days/minutes etc to modify timestamps. Keep everything in seconds and it all becomes so much simpler.
|
Код:
BanPlayer(playerid, bannerid, time[] = "PERMANENT", reason[] = "No Reasons Given") { if(strcmp(time, "PERMANENT", true)) { mysql_format(sqlGameConnection, query, 256, "CREATE EVENT `%e` ON SCHEDULE %s DO DELETE FROM `bans` WHERE `username` = '%e'", name, time, name); mysql_query(sqlGameConnection, query, false); printf("%s %s %e", name, time, name); } format(time, sizeof(time), "%d %s", day, time); BanPlayer(id, playerid,time, reason);
But I implemented the script to main server and tried to ban my friend for one minute only, one minute has passed, he wasn't unbanned. I checked phpmyadmin, and in phpmyadmin there said that my friend will get unbanned after one hour. Same for hours, I banned him for 1 hour, in phpmyadmin it shows that he will get unbanned after 2 hours.
Could you please help me how can I fix that? I deleted my previous thread [GMT problem possibly]. I've no clue why is on loclhost working fine but in main server doesn't.