09.02.2012, 07:50
Код:
IRCCMD:setadmin(botid, channel[], user[], host[], params[]) { new NameBan[128],derpfile[128],playerid,level; if (sscanf(params, "si", NameBan,level)) return IRC_GroupSay(gGroupID, channel,"4USAGE:3 !setadmin <name> <level>"); if(IRC_IsOwner(botid, channel, user)) { format(derpfile, 128, "/myserver/%s.ini", NameBan,level); if(dini_Exists(derpfile)) { new setadmin[64]; admin[playerid] = level; format(setadmin,sizeof(setadmin), "addadmin %s", dini_Get(derpfile, "Admin Level")); format(setadmin,sizeof(setadmin), "4%s3 has given 4%s3 admin level4 %d", NameBan,user,level); IRC_GroupSay(gGroupID, channel, setadmin); } else { return IRC_GroupSay(gGroupID, channel,"4Name doens't exist!"); } } return 1; }