20.04.2017, 18:52
Quote:
|
You mean "function". There's no such thing as "a stock". It's not random, it's just flawed logic. Unless you have negative levels the color will always be white. Consider using a switch.
PHP код:
|
and still not work...
PHP код:
stock SetPlayerColors(playerid, level)
{
switch(GetPlayerWantedLevel(playerid))
{
case 0: SetPlayerColor(playerid, COLOR_WHITE);
case 1 .. 3: SetPlayerColor(playerid, COLOR_YELLOW);
case 4 .. 10: SetPlayerColor(playerid, COLOR_ORANGE)
default: SetPlayerColor(playerid, COLOR_DARKORANGE);
}
return 1;
}


