Use new veh lights prop
This commit is contained in:
@@ -179,19 +179,7 @@ function setVehicleEngine(vehicleId, state) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function setVehicleLights(vehicleId, state) {
|
function setVehicleLights(vehicleId, state) {
|
||||||
if(getGame() != VRR_GAME_MAFIA_ONE) {
|
getElementFromId(vehicleId).lights = state;
|
||||||
if(!state) {
|
|
||||||
getElementFromId(vehicleId).lightStatus = 2;
|
|
||||||
} else {
|
|
||||||
getElementFromId(vehicleId).lightStatus = 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(!state) {
|
|
||||||
getElementFromId(vehicleId).lights = false;
|
|
||||||
} else {
|
|
||||||
getElementFromId(vehicleId).lights = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -205,11 +193,7 @@ function repairVehicle(syncId) {
|
|||||||
function syncVehicleProperties(vehicle) {
|
function syncVehicleProperties(vehicle) {
|
||||||
if(doesEntityDataExist(vehicle, "vrr.lights")) {
|
if(doesEntityDataExist(vehicle, "vrr.lights")) {
|
||||||
let lightStatus = getEntityData(vehicle, "vrr.lights");
|
let lightStatus = getEntityData(vehicle, "vrr.lights");
|
||||||
if(!lightStatus) {
|
vehicle.lights = lightStatus;
|
||||||
vehicle.lightStatus = 2;
|
|
||||||
} else {
|
|
||||||
vehicle.lightStatus = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doesEntityDataExist(vehicle, "vrr.invincible")) {
|
if(doesEntityDataExist(vehicle, "vrr.invincible")) {
|
||||||
@@ -567,4 +551,10 @@ function syncElementProperties(element) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function getPlayerPed(client) {
|
||||||
|
return client.player;
|
||||||
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user