01.07.2015, 19:04
Dont use the UNIX_TIMESTAMP() function in sa-mp, just use gettime() (sa-mp's timestamp function)
Like so:
Like so:
Код:
new string[128], curr_timestamp = gettime(); // ADDED mysql_format(g_SQL, string, sizeof(string), "UPDATE bans SET banby='%e',bannick='%e', banip='%e', banon=%d, banexpire=%d, banned=%d, banperma=%d, bandate=NOW() WHERE banid=%d LIMIT 1", // UPDATED BanInfo[ServerInfo[sCurrentBanID]][BanBy], BanInfo[ServerInfo[sCurrentBanID]][BanNick], BanInfo[ServerInfo[sCurrentBanID]][BanIP], curr_timestamp, // ADDED (curr_timestamp+BanInfo[ServerInfo[sCurrentBanID]][BanExpire]), // UPDATED BanInfo[ServerInfo[sCurrentBanID]][Banned], BanInfo[ServerInfo[sCurrentBanID]][BanPerma], ServerInfo[sCurrentBanID] ); print(string);