01.07.2014, 15:05
hi When i Try /bannick and i want to ban player its not DO anything even dont see a massage and the player didnt get banned
cmd bannick:
VBanNick codes:
cmd bannick:
Код:
CMD:bannick(playerid,params[]) { if(PlayerInfo[playerid][LoggedIn] == 1) { if(PlayerInfo[playerid][Level] >= 2) { new string[53],nickname[50], reason[48]; if(sscanf(params, "s[50]s[48]", nickname, reason)) return SCM(playerid, -1, "USAGE: /Bannick (Nickname) (Reason)"); return VBanNick(playerid,nickname,reason); format(string,sizeof(string),"You have banned \"%s\" from the server. (Reason: %s)",nickname,reason); SaveToFile("BanLog",string); CMDMessageToAdmins(playerid,"BANNICK"); format(string,sizeof(string),"/ladmin/bans/%s.sav", nickname); } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands"); }
Код:
stock VBanNick(playerid,nick[],reason[]) { format(Vnewban,32,BanDir,nick); if(dini_Exists(Vnewban)) return SendClientMessage(playerid, ErrorColor,""COL_BLUE"This username is already banned."); new giveid; giveid = VBReturnUser(nick); if(!IsPlayerConnected(giveid)) { format(NICKBAN,20,nick); format(Vnewban,32,BanDir,VBPlayer(giveid)); dini_Create(Vnewban); return VBanSaveInfo(playerid,Vnewban,reason); } else return VBanID(playerid,giveid,reason); }