Quote:
Originally Posted by EV007
Today I learned that I can use one line
pawn Code:
SetPlayerColor(playerid,(team[playerid] == team_one ) ? COLOR_RED : COLOR_BLUE );
instead of:
pawn Code:
if(team[playerid] == team_one) { SetPlayerColor(playerid,COLOR_RED); } if(team[playerid] == team_two) { SetPlayerColor(playerid,COLOR_BLUE); }
|
Thats called the ternary operator