Scripting help.
#3

Quote:
Originally Posted by Infinity90
Посмотреть сообщение
Example:
pawn Код:
stock AdminRank(playerid)
{
    if(pInfo[PlayerInfo][pAdmin] >= 1)
    {
        new arank[32];
        if(PlayerInfo[playerid][Rank] == 1) format(pdrank, sizeof(pdrank), "Level 1");
        else if(PlayerInfo[playerid][pAdmin] == 2) format(pdrank, sizeof(pdrank), "Level 2");
        else if(PlayerInfo[playerid][pAdmin] == 3) format(pdrank, sizeof(pdrank), "Level 3");
        else if(PlayerInfo[playerid][pAdmin] == 4) format(pdrank, sizeof(pdrank), "Level 4");
        else if(PlayerInfo[playerid][pAdmin] == 5) format(pdrank, sizeof(pdrank), "Level 5");
        else if(PlayerInfo[playerid][pAdmin] == 6) format(pdrank, sizeof(pdrank), "Level 6");
        else if(PlayerInfo[playerid][pAdmin] == 7) format(pdrank, sizeof(pdrank), "Level 7");
        else if(PlayerInfo[playerid][pAdmin] == 8) format(pdrank, sizeof(pdrank), "Level 8");
        else if(PlayerInfo[playerid][pAdmin] == 9) format(pdrank, sizeof(pdrank), "Level 9");
        else if(PlayerInfo[playerid][pAdmin] == 10) format(pdrank, sizeof(pdrank), "Level 10");
    }
    return arank;
}
// USAGE
new str[128];
format(str,sizeof(str),"My Rank: %s",AdminRank(playerid));
Where do i place this in the script? Sorry for being so nubish. Just trying to learn.
Reply


Messages In This Thread
Scripting help. - by Adrick - 21.01.2013, 12:50
Re: Scripting help. - by Infinity90 - 21.01.2013, 12:55
Re: Scripting help. - by Adrick - 21.01.2013, 13:36
Re: Scripting help. - by Infinity90 - 21.01.2013, 13:40
Re: Scripting help. - by Djole1337 - 21.01.2013, 13:42
Re: Scripting help. - by Adrick - 21.01.2013, 13:45

Forum Jump:


Users browsing this thread: 2 Guest(s)