Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

GetPlayerScore - SetPlayerColor

$
0
0
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(playeridCOLOR_YELLOW);
    }
    else if((
GetPlayerScore(playerid) > 500) && (GetPlayerScore(playerid) <= 1000))
    {
    
SetPlayerColor(playeridCOLOR_ORANGE);
    }
    else if((
GetPlayerScore(playerid) > 1000) && (GetPlayerScore(playerid) <= 5000))
    {
    
SetPlayerColor(playeridCOLOR_RED);
    }
    else if((
GetPlayerScore(playerid) > 10000) && (GetPlayerScore(playerid) <= 15000))
    {
    
SetPlayerColor(playeridCOLOR_PURPLE);
    }
     else if((
GetPlayerScore(playerid) > 15000) && (GetPlayerScore(playerid) <= 200000))
    {
    
SetPlayerColor(playeridCOLOR_COOL);
    }
    return 
1;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>