20.05.2015, 15:58
Hello.
I have cmd /banip and /unbanip.
But when type some IP ( /banip and IP) in samp.ban dont have ip.
when someone banned, and im type /unbanip IP , ip is not unbanned :S
here is command:
I have cmd /banip and /unbanip.
But when type some IP ( /banip and IP) in samp.ban dont have ip.
when someone banned, and im type /unbanip IP , ip is not unbanned :S
here is command:
Код:
CMD:banip(playerid, params[]) { new ip[32]; if(IsLogged[playerid] == false) return SendClientMessage(playerid, COLOR_RED, "[SERVER]: "COL_WHITE"Moras biti ulogiran kako bi mogao koristiti komande!"); if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_RED, "[GRESKA]: "COL_WHITE"Nemas prava za koristenje ove komande."); if(gaDuty[playerid] == false) return SendClientMessage(playerid, COLOR_RED, "[GRESKA]: "COL_WHITE"Nisi na Admin duznosti."); if(sscanf(params, "s[32]", ip)) return SendClientMessage(playerid, COLOR_CYAN, "[KORISTI]: "COL_WHITE"/banip [ip]"); else { new string[20]; format(string,sizeof(string),"banip %s",ip); SendRconCommand(string); SendRconCommand("reloadbans"); new string2[124]; format(string2, sizeof(string2), "[ADMIN]: "COL_GREY"Admin %s je banao IP: %s", GetName(playerid), ip); SendMessageToStaff(COLOR_PURPLE, string2); format(string2, sizeof(string2),"[SERVER]: "COL_WHITE"Banao si IP adresu: %s", ip); SendClientMessage(playerid, COLOR_ORANGE,string2); } return 1; } CMD:unbanip(playerid, params[]) { new ip[32]; if(IsLogged[playerid] == false) return SendClientMessage(playerid, COLOR_RED, "[SERVER]: "COL_WHITE"Moras biti ulogiran kako bi mogao koristiti komande!"); if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_RED, "[GRESKA]: "COL_WHITE"Nemas prava za koristenje ove komande."); if(gaDuty[playerid] == false) return SendClientMessage(playerid, COLOR_RED, "[GRESKA]: "COL_WHITE"Nisi na Admin duznosti."); if(sscanf(params, "s[32]", ip)) return SendClientMessage(playerid, COLOR_CYAN, "[KORISTI]: "COL_WHITE"/unbanip [ip]"); else { new string[20]; format(string,sizeof(string),"unbanip %s",ip); SendRconCommand(string); SendRconCommand("reloadbans"); new string2[124]; format(string2, sizeof(string2), "[ADMIN]: "COL_GREY"Admin %s je unbanao IP: %s", GetName(playerid), ip); SendMessageToStaff(COLOR_PURPLE, string2); format(string2, sizeof(string2),"[SERVER]: "COL_WHITE"Unbanao si IP adresu: %s", ip); SendClientMessage(playerid, COLOR_ORANGE,string2); } return 1; }