GMT/Time is possibly no longer my problem, but...
#1

Код:
BanPlayer(playerid, bannerid, time[] = "PERMANENT", reason[] = "No Reasons Given")
{

if(strcmp(time, "PERMANENT", true))
    {
        mysql_format(sqlGameConnection, query, 256, "CREATE EVENT `%e` ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL %s DO DELETE FROM `bans` WHERE `username` = '%e'", name, time, name);
        mysql_query(sqlGameConnection, query, false);
    }


new hour, minute, second;
                            gettime(hour, minute, second);
                            hour = FixHour(hour);
                            format(time, sizeof(time), "%d %d %d %d", day, hour, minute, second);
                            BanPlayer(id, playerid,time, reason);


[15:46:35] Query : CREATE EVENT `Tban_Test` ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 14 46 35 DO DELETE FROM `bans` WHERE `username` = 'Shadow'
[15:46:35] [cmd] [Tban_Test] /tban 0 1 Hour Test
If you need full code tell me.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)