30.08.2011, 18:09
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;
}