11.03.2017, 17:10
Ahoy friends.
Im trying to do this
Can i use >=6 in switch case or do i have to use if-else-if ? Because according to the compiler its an invalid expression
Maybe someone can help to find the best way
Im trying to do this
Код:
switch(TEAMSIZE)
{
case >=2:
{
switch(gPlayerTeamSelection[playerid])
{
case 1:
{
SetPlayerColor(playerid,COLOR_TEAM_ONE);
}
case 2:
{
SetPlayerColor(playerid,COLOR_TEAM_TWO);
}
}
}
case >=3:
{
switch(gPlayerTeamSelection[playerid])
{
case 3:
{
SetPlayerColor(playerid,COLOR_TEAM_THREE);
}
}
}
case >=4:
{
switch(gPlayerTeamSelection[playerid])
{
case 3:
{
SetPlayerColor(playerid,COLOR_TEAM_FOUR);
}
}
}
case >=5:
{
switch(gPlayerTeamSelection[playerid])
{
case 3:
{
SetPlayerColor(playerid,COLOR_TEAM_FIVE);
}
}
}
case >=6:
{
switch(gPlayerTeamSelection[playerid])
{
case 3:
{
SetPlayerColor(playerid,COLOR_TEAM_SIX);
}
}
}
Maybe someone can help to find the best way

