Mysql Trying 3 cases
#7

Dont use the UNIX_TIMESTAMP() function in sa-mp, just use gettime() (sa-mp's timestamp function)

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);
Reply


Messages In This Thread
Mysql Trying 3 cases - by AroseKhanNiazi - 01.07.2015, 12:55
Re: Mysql Trying 3 cases - by Suicidal.Banana - 01.07.2015, 13:08
Re: Mysql Trying 3 cases - by AroseKhanNiazi - 01.07.2015, 15:14
Re: Mysql Trying 3 cases - by Prokill911 - 01.07.2015, 15:41
Re: Mysql Trying 3 cases - by Suicidal.Banana - 01.07.2015, 16:32
Re: Mysql Trying 3 cases - by AroseKhanNiazi - 01.07.2015, 18:29
Re: Mysql Trying 3 cases - by Suicidal.Banana - 01.07.2015, 19:04
Re: Mysql Trying 3 cases - by AroseKhanNiazi - 01.07.2015, 19:41
Re: Mysql Trying 3 cases - by Suicidal.Banana - 01.07.2015, 21:41
Re: Mysql Trying 3 cases - by AroseKhanNiazi - 02.07.2015, 12:19

Forum Jump:


Users browsing this thread: 8 Guest(s)