Make this more simple
#1

Hello guys, i have this stock to promote a player when he gets enough EXP for the next rank. The problem is, I HAVE 45 RANKS, LOL. How i can make it more simple?

This is the current stock:

pawn Код:
stock CheckForLevelUpdate(playerid)
{
    if ( pInfo[playerid][Exp] >= 0 )
    {
        if( pInfo[playerid][Rank] < 1 )
        {
            PlayerPlaySound(playerid, 1150, 0, 0, 0);
            SCM(playerid, COLOR_CON_GREEN,"** You reached the first rank!");
            SCM(playerid, COLOR_CON_GREEN, "** You are a Private!");
            pInfo[playerid][Rank] = 1;
            pInfo[playerid][Cookies] += 1;
            new pname[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pname, 24);
            new msg[128],ok[128];
            format(msg, sizeof(msg), "%s (%d) has been promoted to rank {F70505}%s {FFFFFF}({F70505}%d{FFFFFF})!", pname,playerid,RankName(playerid),pInfo[playerid][Rank]);
            format(ok, sizeof(ok), "03,2%s (%d) has been promoted to rank %s (%d)!",pname,playerid,RankName(playerid),pInfo[playerid][Rank]);
            SCMTA(COLOR_LIGHTBLUE, msg);
            IRC_Say(gGroupID, IRC_CHANNEL, ok);
            SetRank3DText(playerid);
        }
    }
}
I have already the stock for rank names, if are necessary.
Reply


Messages In This Thread
Make this more simple - by Face9000 - 09.08.2013, 18:39
Re: Make this more simple - by Cypress - 09.08.2013, 19:23
Re: Make this more simple - by BullseyeHawk - 09.08.2013, 22:03
Re: Make this more simple - by Face9000 - 10.08.2013, 18:41
Re: Make this more simple - by Face9000 - 10.08.2013, 20:28
Re: Make this more simple - by Kyle1 - 10.08.2013, 20:30
Re: Make this more simple - by Face9000 - 10.08.2013, 20:34

Forum Jump:


Users browsing this thread: 1 Guest(s)