Fix veh lights on GTA
This commit is contained in:
@@ -40,7 +40,6 @@ function processSync(event, deltaTime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (streamingRadioElement) {
|
if (streamingRadioElement) {
|
||||||
streamingRadio.position = getElementPosition(streamingRadioElement.id);
|
|
||||||
//streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position);
|
//streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,24 +47,14 @@ function processSync(event, deltaTime) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function setVehicleLights(vehicleId, state) {
|
function setVehicleLights(vehicleId, state) {
|
||||||
if (getGame() != AGRP_GAME_MAFIA_ONE) {
|
if (getGame() == AGRP_GAME_GTA_IV) {
|
||||||
if (!state) {
|
|
||||||
getElementFromId(vehicleId).lightStatus = 2;
|
|
||||||
} else {
|
|
||||||
getElementFromId(vehicleId).lightStatus = 1;
|
|
||||||
}
|
|
||||||
} else if (getGame() == AGRP_GAME_GTA_IV) {
|
|
||||||
if (!state) {
|
if (!state) {
|
||||||
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 0));
|
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 0));
|
||||||
} else {
|
} else {
|
||||||
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 1));
|
natives.forceCarLights(natives.getVehicleFromNetworkId(vehicleId, 1));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!state) {
|
getElementFromId(vehicleId).lights = state;
|
||||||
getElementFromId(vehicleId).lights = false;
|
|
||||||
} else {
|
|
||||||
getElementFromId(vehicleId).lights = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user