23.04.2013, 17:52
Well, haven't been needing to ask for help for a while, but yeah, this command really got to me, it's saying "giveplayer" isn't defined, when i'm sure as hell i defined it, so i have no idea what i'm doing wrong here
Код:
CMD:ojail(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2) { new playa,time,reason[65]; if(!sscanf(params, "uis[64]", playa, time, reason)) { new pID = MySQLCheckAccount(giveplayer); new giveplayer[MAX_PLAYER_NAME]; giveplayer = PlayerNameEx(playa); new sendername[MAX_PLAYER_NAME]; sendername = PlayerNameEx(playerid); new string[128]; format(string, sizeof(string), "* You jailed %s for %d minute(s).", giveplayer, time); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "System: %s was offline jailed by %s for %d minute(s), Rason: %s", giveplayer, sendername, time, reason); BroadCast(COLOR_LIGHTRED, string); format(string, sizeof(string), "UPDATE `userinfo` SET `Jailed` = 1 WHERE `Jailed` = 500 WHERE `ID`= %d;", pID); mysql_query(string); return 1; } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "You are not authorized to use this command!"); return 1; } return 1; }