03.10.2010, 09:18
Hello. First of all tell me if its right:
Second i wanted that to change player color if they get enough score.
Is it right?
Код:
public OnPlayerUpdate(playerid) { if((GetPlayerScore(playerid) >= 0) && (GetPlayerScore(playerid) <= 100)) { SetPlayerColor(playerid, WHITE); return 1; } if((GetPlayerScore(playerid) > 100) && (GetPlayerScore(playerid) <= 500)) { SetPlayerColor(playerid, GREEN); return 1; } if((GetPlayerScore(playerid) > 500) && (GetPlayerScore(playerid) <= 1100)) { SetPlayerColor(playerid, GREY); return 1; } if((GetPlayerScore(playerid) > 1100) && (GetPlayerScore(playerid) <= 2000)) { SetPlayerColor(playerid, YELLOW); return 1; } if((GetPlayerScore(playerid) > 2000) && (GetPlayerScore(playerid) <= 20000)) { SetPlayerColor(playerid, LTBLUE); return 1; } return 1; }
Is it right?