for(new i = 0; i < MAX_PLAYERS; i++){ if(gTeam[i] //or whatever you use == TEAM_SOMETHING) { SetVehicleParamsForPlayer(vehicleid, i, true, false); }}