26.09.2013, 12:43
guys, who can make a /unban command for me?
thank you.
thank you.
dcmd_unban(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not autorized to use this command!"); new rcmsg[80], acct[24], file[64],name[24],string[128],otherfile[64]; GetPlayerName(playerid, name, sizeof(name)); if(sscanf(params, "s", acct)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /unban [account name]"); format(file, sizeof(file),"Location of your accounts/%s.ini", acct); if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_LIGHTRED,"Error: account doesn't exists!"); dini_IntSet(file, "Banned", 0); format(ipFILE, 128, "Location of your accounts Aliases/%s.txt", acct); format(rcmsg, sizeof(rcmsg), "unbanip %s", dini_Get(ipFILE,"NameIp")); SendRconCommand(rcmsg); SendRconCommand("reloadbans"); format(otherfile,sizeof(otherfile),"BAN FOLDER/%s.ban",dini_Get(ipFILE,"NameIp")); fremove(otherfile); format(string, sizeof(string), "[ADMIN]: %s has unbanned The account of %s.", name,acct); ABroadCast(COLOR_LIGHTRED,string, 5); format(string, sizeof(string), "[ADMIN]: IP %s has been removed by the ban list by %s.", dini_Get(ipFILE,"NameIp"), name); ABroadCast(COLOR_WHITE,string, 5); format(string, sizeof(string), "* Administrator %s Has Unbanned the account of %s", name,acct); SendClientMessageToAll(COLOR_NICERED,string); format(string, sizeof(string), "* Successfuly Unbanned %s's account & removed %s from the ban list", name,dini_Get(ipFILE,"NameIp")); SendClientMessage(playerid,TEAM_GROVE_COLOR,string); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Unbanned the Account of %s (%s)",d,m,y,h,mi,s,name,acct,dini_Get(ipFILE,"NameIp")); LoginLog(string); return 1; }