There is something wrong with this coding but I cant seem to see what, eg. when the player's score is 1001 it still shows the first color for 0-500, can someone help me please?
PHP Code:
public OnPlayerUpdate(playerid)
{
if((GetPlayerScore(playerid) >= 0) && (GetPlayerScore(playerid) <= 500))
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
else if((GetPlayerScore(playerid) > 500) && (GetPlayerScore(playerid) <= 1000))
{
SetPlayerColor(playerid, COLOR_ORANGE);
}
else if((GetPlayerScore(playerid) > 1000) && (GetPlayerScore(playerid) <= 5000))
{
SetPlayerColor(playerid, COLOR_RED);
}
else if((GetPlayerScore(playerid) > 10000) && (GetPlayerScore(playerid) <= 15000))
{
SetPlayerColor(playerid, COLOR_PURPLE);
}
else if((GetPlayerScore(playerid) > 15000) && (GetPlayerScore(playerid) <= 200000))
{
SetPlayerColor(playerid, COLOR_COOL);
}
return 1;
}