30.08.2017, 17:12
My server only kick players does not ban them because?
Users
Код:
CMD:ban(playerid, params[]) { if(Player[playerid][Level] < 3) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}You need to be a higher admin level."); if(AllowStartBase == false) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}Can't kick now. Please wait."); new Params[2][128], iString[180]; #if PLUGINS == 1 sscanf(params, "s[128]s[128]", Params[0], Params[1]); #else sscanf(params, "ss", Params[0], Params[1]); #endif if(isnull(Params[0]) || !IsNumeric(Params[0])) return SendClientMessage(playerid,-1,"{FFFFFF}USAGE: {0099FF}/ban [Player ID] [Reason]"); new pID = strval(Params[0]); if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}That player isn't connected."); if(Player[pID][Level] >= Player[playerid][Level]) return SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}Can't ban someone of same or higher admin level."); new IP[50]; GetPlayerIp(pID, IP, sizeof(IP)); new bool:GiveReason; if(isnull(Params[1])) GiveReason = false; else GiveReason = true; if(GiveReason == false) { format(iString, sizeof(iString), "{FFFFFF}%s {0099FF}has banned {FFFFFF}%s (IP: %s) {0099FF}| Reason: {FFFFFF}No Reason Given", Player[playerid][Name], Player[pID][Name], IP); SendClientMessageToAll(-1, iString); Ban(pID);/// } else { format(iString, sizeof(iString), "{FFFFFF}%s {0099FF}has banned {FFFFFF}%s (IP: %s) {0099FF}| Reason: {FFFFFF}%s", Player[playerid][Name], Player[pID][Name], IP, Params[1]); SendClientMessageToAll(-1, iString); BanEx(pID, Params[1]);/// } SetTimerEx("OnPlayerBan", 1000, false, "i", pID); return 1; }
Код:
Password=344907E89B981CAF221D05F597EB57A6AF408F15F4DD7895BBD1B96A2938EC24A7DCF23ACB94ECE0B6D7B0640358BC56BDB448194B9305311AFF038A834A079F Level=0 Weather=0 Time=10 ChatChannel=-1