14.02.2014, 14:37
Код HTML:
SetPlayerTeamFromClass(playerid, classid) { if (classid == 0) { gTeam[playerid] = TEAM_BALLAS; } else if (classid == 1) { gTeam[playerid] = TEAM_BALLAS; } else if (classid == 2) { gTeam[playerid] = TEAM_BALLAS; } else if (classid == 3) { gTeam[playerid] = TEAM_GROVE; } else if (classid == 4) { gTeam[playerid] = TEAM_GROVE; } else if (classid == 5) { gTeam[playerid] = TEAM_GROVE; } else if (classid == 6) { gTeam[playerid] = TEAM_VAGOS; } else if (classid == 7) { gTeam[playerid] = TEAM_VAGOS; } else if (classid == 8) { gTeam[playerid] = TEAM_VAGOS; } }
I've tried:
Код HTML:
if (classid == 0 || 1 || 2) { gTeam[playerid] = TEAM_BALLAS; } else if (classid == 3 || 4 || 5) { gTeam[playerid] = TEAM_GROVE; } else if (classid == 6 || 7 || 8) { gTeam[playerid] = TEAM_VAGOS; }