From 23c513a31667fd446801a2d8db6d6a05883b58ff Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Tue, 3 May 2022 11:55:18 -0500 Subject: [PATCH] Use new veh lights prop --- scripts/client/native/connected.js | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/scripts/client/native/connected.js b/scripts/client/native/connected.js index 4490167e..024e6c91 100644 --- a/scripts/client/native/connected.js +++ b/scripts/client/native/connected.js @@ -179,19 +179,7 @@ function setVehicleEngine(vehicleId, state) { // =========================================================================== function setVehicleLights(vehicleId, state) { - if(getGame() != VRR_GAME_MAFIA_ONE) { - if(!state) { - getElementFromId(vehicleId).lightStatus = 2; - } else { - getElementFromId(vehicleId).lightStatus = 1; - } - } else { - if(!state) { - getElementFromId(vehicleId).lights = false; - } else { - getElementFromId(vehicleId).lights = true; - } - } + getElementFromId(vehicleId).lights = state; } // =========================================================================== @@ -205,11 +193,7 @@ function repairVehicle(syncId) { function syncVehicleProperties(vehicle) { if(doesEntityDataExist(vehicle, "vrr.lights")) { let lightStatus = getEntityData(vehicle, "vrr.lights"); - if(!lightStatus) { - vehicle.lightStatus = 2; - } else { - vehicle.lightStatus = 1; - } + vehicle.lights = lightStatus; } if(doesEntityDataExist(vehicle, "vrr.invincible")) { @@ -567,4 +551,10 @@ function syncElementProperties(element) { } } +// =========================================================================== + +function getPlayerPed(client) { + return client.player; +} + // =========================================================================== \ No newline at end of file