Something like this, you should compare the actual score with the next score for the next rank.
pawn Код:
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYER_NAME+1], string[128]; // lazy to count each cell.
GetPlayerName(playerid, pname, sizeof(pname));
if(GetPlayerScore(playerid) <= 1) {
format(string, sizeof(string), "%s has logged in with the rank: Newbie Trucker", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
}
else if(GetPlayerScore(playerid) > 1 && GetPlayerScore(playerid) <=50 ) {
format(string, sizeof(string), "%s has logged in with the rank: Trucker in Training", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
}
else if(GetPlayerScore(playerid) > 50 && GetPlayerScore(playerid) <=250 ) {
format(string, sizeof(string), "%s has logged in with the rank: Trucker", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
}
else if(GetPlayerScore(playerid) > 250 && GetPlayerScore(playerid) <=500 ) {
format(string, sizeof(string), "%s has logged in with the rank: Half-Experienced Trucker", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
}
else if(GetPlayerScore(playerid) > 500 && GetPlayerScore(playerid) <=1000 ) {
format(string, sizeof(string), "%s has logged in with the rank: Full-Experienced Trucker", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
}
else if(GetPlayerScore(playerid) >1000 && GetPlayerScore(playerid) <=3000 ) {
format(string, sizeof(string), "%s has logged in with the rank: European Trucker", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
else if(GetPlayerScore(playerid) > 3000 ) {
format(string, sizeof(string), "%s has logged in with the rank: Worl European Trucker", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
}
return 1;
}