03.08.2018, 19:35
ISSUE: The command sends successfully, but the target in question does not get banned. How can I fix this, and why does this not work?
I am new to MySQL in sa-mp.
I am new to MySQL in sa-mp.
Код:
new query[65], tempip[16]; mysql_format(gSQL, query, sizeof query, "SELECT * FROM `Users` WHERE `Name` = '%e'", target); if(mysql_tquery(gSQL, query, "OnAccountExist", "i", playerid)) { cache_get_value_name(0, "LastIP", tempip, 16); new str[144], expiretime = (gettime() + (((time * 24) * 60) * 60)); if(time > 0) format(str, sizeof str, "* %s %s has offline banned %s for \"%s\" till %s.", gStaff[pInfo[playerid][AdminLvl]], pName[playerid], target, reason, ReturnDate(expiretime)); else format(str, sizeof str, "* %s %s has permanently offline banned %s for \"%s\".", gStaff[pInfo[playerid][AdminLvl]], pName[playerid], target, reason); SendClientMessageToAll(COLOR_PINK, str); mysql_format(gSQL, query, sizeof query, "INSERT INTO `Bans` (`ExpireDate`, `IP`, `Name`, `Reason`, `BanBy`) VALUES (%d, '%e', '%e', '%e', '%e')", expiretime, tempip, target, reason, pName[playerid]); mysql_tquery(gSQL, query); } else { SendClientMessage(playerid, COLOR_RED, "ERROR: "COL_GREY"That account doesn't exist."); }