How to return string.
#7

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;
}
Reply


Messages In This Thread
How to return string. - by CoaPsyFactor - 10.06.2011, 19:08
Re: How to return string. - by xRyder - 10.06.2011, 19:14
Re: How to return string. - by Scenario - 10.06.2011, 19:14
Re: How to return string. - by CoaPsyFactor - 10.06.2011, 19:17
Re: How to return string. - by Scenario - 10.06.2011, 19:20
Re: How to return string. - by xRyder - 10.06.2011, 19:21
Re: How to return string. - by Mike Garber - 10.06.2011, 19:23
Re: How to return string. - by CoaPsyFactor - 10.06.2011, 19:28

Forum Jump:


Users browsing this thread: 2 Guest(s)