Question +rep
#4

@GhostHacker, actually it is.
@Banditul18, you should define your function in this way:
PHP код:
stock GetPlayerRank(playeridrank[], len)
{
    new 
tirist APlayerData[playerid][StatsTruckerJobs];
    
    if(
tirist >= && tirist <= 50format(ranklen"Rookie Trucker");
    else if (
tirist >= 51 && tirist <= 100format(ranklen"Good Trucker");
    else if (
tirist >= 101 && tirist <= 150format(ranklen"Very Good Trucker");
    else if (
tirist >= 151 && tirist <= 250format(ranklen"Expert Trucker");
    else if (
tirist >= 251 && tirist <= 500format(ranklen"The Best Trucker");
    else if (
tirist >= 501format(ranklen"King of the Road");
    return 
1;

Then, whenever you need to get a string of a player's rank:
PHP код:
new rank[64];
GetPlayerRank(playeridranksizeof(rank));
// And lets output the rank (just for an example)
new string[64];
format(stringsizeof(string), "Your rank is: %s"rank);
SendClientMessage(playerid, -1string); 
//Edit: didn't noticed that someone has already gave an answer
Reply


Messages In This Thread
Question +rep - by Banditul18 - 15.02.2016, 10:17
Re: Question +rep - by GhostHacker - 15.02.2016, 10:19
Re: Question +rep - by J0sh... - 15.02.2016, 10:27
Re: Question +rep - by valych - 15.02.2016, 10:30
Re: Question +rep - by MicroKyrr - 15.02.2016, 10:33

Forum Jump:


Users browsing this thread: 1 Guest(s)