13.06.2014, 03:34
You guys are going to get tired of seeing me. ^-^
So my issue, I have a command that kicks me and doesn't ban me. Any sugguestions?
So my issue, I have a command that kicks me and doesn't ban me. Any sugguestions?
Код:
CMD:rban(playerid, params[]) { LoginCheck(playerid); LevelCheck(playerid, 4); new str[130], id ; if(sscanf(params, "uS(No Reason)[128]", id, params)) return SendUsage(playerid, "/rban <PlayerID> <Reason(Optional)>", "Range bans the specified player's IP."); if(id == INVALID_PLAYER_ID) return SendError(playerid, "Player is not connected."); if(id == playerid) return SendError(playerid, "You cannot ban yourself."); if(pInfo[playerid][Admin] < pInfo[id][Admin]) return SendError(playerid, "You cannot use this command on a higher level administrator."); ClearChatB(id, 100); format(str, sizeof(str), "{AFAFAF}%s{FF6347} has been ranged banned by [ADMIN] {AFAFAF}%s{FF6347} (Reason: {AFAFAF}%s{FF6347})", GetName(id), GetName(playerid), params); SendClientMessageToAll(COLOR_CHAT, str); format(str, sizeof(str), "You have range banned {AFAFAF}%s{FF6347} (Reason: {AFAFAF}%s{FF6347})", GetName(id), params); SendClientMessage(playerid, COLOR_CHAT, str); format(str, sizeof(str), "You have been banned by [ADMIN] {AFAFAF}%s{FF6347}", GetName(playerid)); SendClientMessage(id, COLOR_CHAT, str); PlaySoundForAll(1140); new ip[50]; GetPlayerIp(id, ip, 16); strdel(ip, strlen(ip)-4, strlen(ip)); format(ip, sizeof(ip), "%s**.**", ip); format(ip, sizeof(ip), "banip %s", ip); SendRconCommand(ip); SendRconCommand("reloadbans"); //KickDelay(id); SendAdm(playerid, "RBAN"); return 1; }