GetFactionRank
#1

I'm using this stock to get a certain faction's rank but it's not working(nothing is shown):

pawn Код:
GetFactionRank(playerid)
{
    new facrank[24];
    new string[24];
    if(PlayerInfo[playerid][pFactionRank] == 1)
    {
        format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank1]);
    }
    else if(PlayerInfo[playerid][pFactionRank] == 2)
    {
        format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank2]);
    }
    else if(PlayerInfo[playerid][pFactionRank] == 3)
    {
        format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank3]);
    }
    else if(PlayerInfo[playerid][pFactionRank] == 4)
    {
        format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank4]);
    }
    else if(PlayerInfo[playerid][pFactionRank] == 5)
    {
        format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank5]);
    }
    else if(PlayerInfo[playerid][pFactionRank] == 6)
    {
        format(string, sizeof(string), "%s", FacInfo[PlayerInfo[playerid][pFaction]][fRank6]);
    }// hmm
    switch(PlayerInfo[playerid][pFactionRank])
    {
        case 1:
        facrank = string;
        case 2:
        facrank = string;
        case 3:
        facrank = string;
        case 4:
        facrank = string;
        case 5:
        facrank = string;
        case 6:
        facrank = string;
        default:
        facrank = "None";
    }
    return facrank;
}
Reply


Messages In This Thread
GetFactionRank - by Zeppo - 22.03.2014, 19:08
Re: GetFactionRank - by Matess - 22.03.2014, 19:14
Re: GetFactionRank - by Zeppo - 22.03.2014, 19:17
Re: GetFactionRank - by MP2 - 22.03.2014, 19:38
Re: GetFactionRank - by iFarbod - 22.03.2014, 19:43
Re: GetFactionRank - by Zeppo - 23.03.2014, 14:04

Forum Jump:


Users browsing this thread: 1 Guest(s)