stock GetAdmNameLevelByNumber(lvl)
{
new string[21];
switch(lvl)
{
case 0: string = "Newbie";
case 1: string = "Operator";
case 2: string = "Moderator";
case 3: string = "Junior Administrator";
case 4: string = "Senior Administrator";
case 5: string = "Head Administrator";
case 6: string = "Hero Administrator";
case 7: string = "Community Owner";
}
return lvl;
}
//stuff here
//stuff here
//stuff here
new string[128], str2[128];
format(string, sizeof(string), "You have made %s, Level %s(%d)", Name(player), GetAdmNameLevelByNumber(alevel), alevel);
SendClientMessage(playerid, SUCCESS, string);
format(str2, sizeof(str2), "Administrator %s has made you %s(%d)", Name(playerid), GetAdmNameLevelByNumber(alevel), alevel);
SendClientMessage(player, SUCCESS, str2);
PlayerInfo[player][pAdmin] = alevel;
You have made Drake, Level @Drake(7)
Administrator Drake has made you @Drake(7)
You are returning the level from the function instead of the string.
|
stock GetAdmNameLevelByNumber(lvl)
{
new string[21];
switch(lvl)
{
case 0: string = "Newbie";
case 1: string = "Operator";
case 2: string = "Moderator";
case 3: string = "Junior Administrator";
case 4: string = "Senior Administrator";
case 5: string = "Head Administrator";
case 6: string = "Hero Administrator";
case 7: string = "Community Owner";
}
return string;
}