29.01.2012, 20:48
Hey, I'm quite new to pawn so please don't laugh.
I'm developing a training gamemode for a roleplay server and I'm trying to stock the names of the faction's ranks.
In this case the police department, and I'm having some problems with it.
I want it so when I type "rankname[playerid]" it will display the rank's name instead of the number.
Please tell me what's wrong with it and how can I fix this, thanks.
I'm developing a training gamemode for a roleplay server and I'm trying to stock the names of the faction's ranks.
In this case the police department, and I'm having some problems with it.
I want it so when I type "rankname[playerid]" it will display the rank's name instead of the number.
PHP код:
stock rankname(playerid)
{
switch(PlayerInfo[playerid][pRank])
{
case 0: rankname(playerid) = "None";
case 1: rankname(playerid) = "Recruit";
case 2: rankname(playerid) = "Police Officer I";
case 3: rankname(playerid) = "Police Officer II";
case 4: rankname(playerid) = "Lead Officer";
case 5: rankname(playerid) = "Senior Lead Officer";
case 6: rankname(playerid) = "Sergeant";
case 7: rankname(playerid) = "Staff Sergeant";
case 8: rankname(playerid) = "Lieutenant";
case 9: rankname(playerid) = "Captain";
case 10: rankname(playerid) = "Commander";
case 11: rankname(playerid) = "Deputy Chief";
case 12: rankname(playerid) = "Chief of Police";
}
}