Does This Need Else If?
#1

pawn Код:
stock UpdateRank(playerid)
{
    new string[128];
    if(PInfo[playerid][Owner] == 1) return format(pRank[playerid],128,"Server Owner");
    if(PInfo[playerid][Level] < 500) return format(pRank[playerid],128,"Administrator");
    if(PInfo[playerid][Missionspassed] >= 0 && PInfo[playerid][Missionspassed] < 10) return format(pRank[playerid],128,"New Trucker");
    if(PInfo[playerid][Missionspassed] >= 10 && PInfo[playerid][Missionspassed] < 25) return format(pRank[playerid],128,"Trucker");
    if(PInfo[playerid][Missionspassed] >= 25 && PInfo[playerid][Missionspassed] < 45) return format(pRank[playerid],128,"Advancing Trucker");
    if(PInfo[playerid][Missionspassed] >= 45 && PInfo[playerid][Missionspassed] < 65) return format(pRank[playerid],128,"Advanced Trucker");
    if(PInfo[playerid][Missionspassed] >= 65 && PInfo[playerid][Missionspassed] < 90) return format(pRank[playerid],128, "Respected Trucker");
    if(PInfo[playerid][Missionspassed] >= 90 && PInfo[playerid][Missionspassed] < 115) return format(pRank[playerid],128,"Trucking Maniac");
    if(PInfo[playerid][Missionspassed] >= 115 && PInfo[playerid][Missionspassed] < 145) return format(pRank[playerid],128,"Trucking is my life!");
    if(PInfo[playerid][Missionspassed] >= 145 && PInfo[playerid][Missionspassed] < 170) return format(pRank[playerid],128,"Trucking Addicted");
    if(PInfo[playerid][Missionspassed] >= 170) return pRank[playerid] = "Trucking God";
    format(string,sizeof(string),"%s",pRank[playerid]);
    Update3DTextLabelText(Ranklbl[playerid],green2,string);
    return 1;
}
Reply


Messages In This Thread
Does This Need Else If? - by Shockey HD - 30.08.2011, 18:09
Re: Does This Need Else If? - by FireCat - 30.08.2011, 18:10
Re: Does This Need Else If? - by Kingunit - 30.08.2011, 18:12
Re : Does This Need Else If? - by Naruto_Emilio - 30.08.2011, 18:12
Re: Does This Need Else If? - by AndreT - 30.08.2011, 18:42
Re: Does This Need Else If? - by Kar - 30.08.2011, 18:44
Re: Does This Need Else If? - by Vince - 30.08.2011, 18:51
Re: Does This Need Else If? - by [L3th4l] - 30.08.2011, 18:59
Re: Does This Need Else If? - by Mauzen - 30.08.2011, 20:10
Re: Does This Need Else If? - by AndreT - 30.08.2011, 21:26

Forum Jump:


Users browsing this thread: 1 Guest(s)