22.09.2011, 16:30
Well, I've made a kick command that looks like this:
It should work perfectly, but when I type /kick, I get "/kick : You are not an admin"
But such message isn't in my whole script!
What to do?
Код:
CMD:kick(playerid, params[]) { if(PlayerInfo[playerid][AdminLevel] >= 1) { new kicked[MAX_PLAYER_NAME], kicker[MAX_PLAYER_NAME], reason[24], id; if(sscanf(params, "us[24]", kicked, reason)) return SendClientMessage(playerid, COLOR_RED, "[SERVER]: /kick [ID/PartOfName] [Reaosn]"); else { new string[128]; GetPlayerName(id, kicked, sizeof(kicked)); GetPlayerName(playerid, kicker, sizeof(kicker)); format(string, sizeof(string), "[ADMIN]: %s has been kicked by %s. Reason: %s.", kicked, kicker, reason); Kick(id); } } else return SendClientMessage(playerid, COLOR_GREY, " You aren't authorized to use this command !"); return 1; }
But such message isn't in my whole script!
What to do?