Quote:
Originally Posted by Recardo
ARE You Crazy? I KNOW IT ! I Mean How did player when HAVE 3 Stars Got YELLOW Color and when get 4 got Ornage.... Plesae Understand
|
Firstly, you have to chill bro'. We are to help you, but we oblige.
So, you want when a player gets 4th stars, his name is orange?
Check this native function called
OnPlayerUpdate(playerid)
PHP код:
public OnPlayerUpdate(playerid)
This function return something every player's action. So it's usefull to check if the player have 0, 1, ..., 4 stars!
Let's make a condition :
PHP код:
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_ORANGE 0xff9900FF
public OnPlayerUpdate(playerid)
{
if(GetPlayerWantedLevel(playerid) > 0 && GetPlayerWantedLevel(playerid) =< 3) // Check if the player has more 0 wanted level AND (&&) if the players have less of 4 wanted level
{
SetPlayerColor(playerid, COLOR_YELLOW); // So.. We set the player's YELLOW
}
if(GetPlayerWantedLevel(playerid) > 3) // Check again if the player has MORE 3 wanted levels
{
SetPlayerColor(playerid, COLOR_ORANGE); // Set the player's color in ORANGE
}
return 1; // Return 1 to finish the function
}
I hope, I helped you. Also you may check the SA:MP's WIKI.