17.10.2016, 22:39
Hello, why when i do /kick or /ban i get that
i have that problem in my two servers (Dm and FreeRoam )
but it's works when i open that offline (test server)
Quote:
/kick:you are not an admin |
Quote:
/ban:you are not an admin |
Код:
CMD:ban(playerid, params[]) { if(PlayerInfo[playerid][AdminLevel] >= 6) { new targetid, tname[MAX_PLAYER_NAME], reason[128]; new name[MAX_PLAYER_NAME], string[128]; if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /ban [playerid] [reason]"); if(targetid != INVALID_PLAYER_ID) { GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(targetid, tname, sizeof(tname)); format(string, sizeof(string), "ADMIN-BAN: %s, (Reason: %s)", tname, reason); SendClientMessageToAll(BANNEDMESSAGE, string); SaveIn("BanLog",string); Ban(targetid); SendCommandToAdmins(playerid,"/ban"); } else return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid"); } else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast Admin Level 6 to use this command"); return 1; }
Код:
CMD:kick(playerid, params[]) { if(PlayerInfo[playerid][AdminLevel] >= 2) { new targetid, tname[MAX_PLAYER_NAME], reason[128]; new name[MAX_PLAYER_NAME], string[128]; if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /kick [playerid] [reason]"); if(targetid != INVALID_PLAYER_ID) { GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(targetid, tname, sizeof(tname)); format(string, sizeof(string), "ADMIN-KICK: %s, (Reason: %s)", tname, reason); SendClientMessageToAll(BANNEDMESSAGE, string); SaveIn("KickLog",string); Kick(targetid); SendCommandToAdmins(playerid,"/kick"); } else return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid"); } else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast Admin Level 2 to use this command"); return 1; }