05.04.2013, 18:59
Quote:
You mean to make it say "an adminstrator" not "a adminstrator" ? |
Quote:
I'm having troubles of understanding your question..
Can you re-word it for me? If you are trying to make it say 'an' instead of 'a' then it will be this: Код:
CMD:setadmin(playerid, params[]) { new id, adminlevel,MyRank[32],HisRank[32],MyName[32],HisName[32]; if(PlayerInfo[playerid][pAdmin] <= 4) return SendClientMessage(playerid, COLOR_SILVER, "You must be atleast a Community Owner to use this command!"); else if(sscanf(params, "ud", id, adminlevel)) return SendClientMessage(playerid, COLOR_SILVER, "Syntax: /setadmin [PlayerID][Admin Level]"); else if(adminlevel < 0 || adminlevel > 5) return SendClientMessage(playerid, COLOR_SILVER, "Error: Must be level 1-5!"); else { if(PlayerInfo[id][pAdmin] == adminlevel) return SendClientMessage(playerid, COLOR_SILVER, "Error: This player is already that level!"); else { GetPlayerName(playerid,MyName,32); GetPlayerName(id,HisName,32); PlayerInfo[id][pAdmin] = adminlevel; if(PlayerInfo[playerid][pAdmin] == 1){MyRank = "Moderator";} if(PlayerInfo[playerid][pAdmin] == 2){MyRank = "Trial Administrator";} if(PlayerInfo[playerid][pAdmin] == 3){MyRank = "Administrator";} if(PlayerInfo[playerid][pAdmin] == 4){MyRank = "Lead Administrator";} if(PlayerInfo[playerid][pAdmin] == 5){MyRank = "Community Owner";} if(PlayerInfo[id][pAdmin] == 1){HisRank = "Moderator";} if(PlayerInfo[id][pAdmin] == 2){HisRank = "Trial Administrator";} if(PlayerInfo[id][pAdmin] == 3){HisRank = "Administrator";} if(PlayerInfo[id][pAdmin] == 4){HisRank = "Lead Administrator";} if(PlayerInfo[id][pAdmin] == 5){HisRank = "Community Owner";} new string[128]; format(string, sizeof(string), "[AdmCmd] %s %s(ID:%d) had made %s(ID:%d) an %s",MyRank,MyName,playerid,HisName,id,HisRank); SendClientMessageToAll(COLOR_YELLOW,string); } } return 1; } |
but, it is possible to do it only when the person becomes an Administrator?