25.03.2014, 15:41
Hello, why my /oban dont work if i type /oban all works and if i type /oban randomplayername which dont exist it knows it. but if i a player is registered with the name "Guest" for example and i type /oban "Guest" it shows "SERVER: Unknown command". Why?
Код:
CMD:oban(playerid, params[]) { new tname[24], filestring[79]; if(sscanf(params, "s[24]", tname)) return SendClientMessage(playerid,-1,""chat" Usage: /oban [playername]"); format(filestring, sizeof(filestring), "/Users/%s.ini", tname); if(!fexist(filestring)) return SendClientMessage(playerid,-1,""chat""COL_RED" This player does not exist."); else { new INI:File = INI_Open(filestring); INI_SetTag(File, "data"); INI_WriteInt(File, "pBanned", 1); INI_Close(File); INI_ParseFile(filestring, "LoadIP_%s", .bExtra = true , .extra = playerid); new cmdstring[44]; format(cmdstring, sizeof(cmdstring), "banip %s", pInfo[playerid][BannedIP]); SendRconCommand(cmdstring); new str[128]; format(str,sizeof(str),""chat""COL_RED" %s %s (%d) has offline banned %s",GetAdminName(playerid),PlayerName(playerid),playerid,tname); SendClientMessageToAll(-1,str); } return 1; }