20.01.2011, 16:12
this command is work and all good no erros but what is the problem when i do in the game
/setlevel (playerid) (level)
Exampel
/setlevel 3 1
its tell me
SERVER: UNKNOWN COMMAND
/setlevel (playerid) (level)
Exampel
/setlevel 3 1
its tell me
SERVER: UNKNOWN COMMAND
Код:
dcmd_setlevel(playerid, params[]) { new Level, pID, pName[24], str[128], PlayerFile[100]; if(Player[playerid][admin] < 5) return SendClientMessage(playerid, COLOR_RED, "You Dont Have Right To Use This Command"); if(sscanf(params, "ud",playerid, Level)) return SendClientMessage(playerid, COLOR_RED, "|| Usage: /setlevel [playerid] [level] ||"); GetPlayerName(playerid, pName, sizeof(pName)); format(PlayerFile, sizeof(PlayerFile), "maxadmin/users/%s.ini", pName); if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!"); if(!dini_Exists(PlayerFile)) return SendClientMessage(playerid, COLOR_RED, "That player isn't registered!"); if(Player[playerid][admin] == Level) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is moderator already!"); if(Level == 1) { format(str, sizeof(str), "You have promoted %s to a staff team", pName); SendClientMessage(playerid, COLOR_GREEN, str); format(str, sizeof(str), "You have prometed to a staff team status.", pName); SendClientMessage(pID, COLOR_GREEN, str); Player[playerid][admin] = 1; dini_IntSet(PlayerFile, "Level", 1); } return 1; }