10.06.2011, 19:23
I have done this for my gamemode, you can easily modify it for your needs;
pawn Код:
stock RankName(playerid)
{
new rankn[16],groupid;
groupid = pData[playerid][pGroup];
new rank = pData[playerid][pRank];
switch(rank)
{
case 1: format(rankn,sizeof(rankn),"%s",gData[groupid][gRank1]);
case 2: format(rankn,sizeof(rankn),"%s",gData[groupid][gRank2]);
case 3: format(rankn,sizeof(rankn),"%s",gData[groupid][gRank3]);
case 4: format(rankn,sizeof(rankn),"%s",gData[groupid][gRank4]);
case 5: format(rankn,sizeof(rankn),"%s",gData[groupid][gRank5]);
case 6: format(rankn,sizeof(rankn),"%s",gData[groupid][gRank6]);
case 7: format(rankn,sizeof(rankn),"%s",gData[groupid][gRank7]);
}
return rankn;
}