Help with a stock.
#1

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.

PHP код:
stock rankname(playerid)
{
    switch(
PlayerInfo[playerid][pRank])
    {
        case 
0rankname(playerid) = "None";
        case 
1rankname(playerid) = "Recruit";
        case 
2rankname(playerid) = "Police Officer I";
        case 
3rankname(playerid) = "Police Officer II";
        case 
4rankname(playerid) = "Lead Officer";
        case 
5rankname(playerid) = "Senior Lead Officer";
        case 
6rankname(playerid) = "Sergeant";
        case 
7rankname(playerid) = "Staff Sergeant";
        case 
8rankname(playerid) = "Lieutenant";
        case 
9rankname(playerid) = "Captain";
        case 
10rankname(playerid) = "Commander";
        case 
11rankname(playerid) = "Deputy Chief";
        case 
12rankname(playerid) = "Chief of Police";
    }

Please tell me what's wrong with it and how can I fix this, thanks.
Reply


Messages In This Thread
Help with a stock. - by xRandomGuy - 29.01.2012, 20:48
Re: Help with a stock. - by LetsOWN[PL] - 29.01.2012, 20:52
Re: Help with a stock. - by Wesley221 - 29.01.2012, 21:09
Re: Help with a stock. - by MP2 - 29.01.2012, 21:11
Re: Help with a stock. - by Ash. - 29.01.2012, 21:13
Re: Help with a stock. - by MP2 - 29.01.2012, 21:15
Re: Help with a stock. - by Ash. - 29.01.2012, 21:16
Re: Help with a stock. - by yanir3 - 29.01.2012, 21:42
Re: Help with a stock. - by xRandomGuy - 29.01.2012, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)