mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 09:48:52 +00:00
Merge pull request #101 from CCasusensa/master
fixed Free Tuning Bug after being shot by a stun gun
This commit is contained in:
+7
-4
@@ -42,15 +42,18 @@ end)
|
||||
RegisterNetEvent('esx_lscustom:cancelInstallMod')
|
||||
AddEventHandler('esx_lscustom:cancelInstallMod', function()
|
||||
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
|
||||
ESX.Game.SetVehicleProperties(vehicle, myCar)
|
||||
if (GetPedInVehicleSeat(vehicle, -1) ~= PlayerPedId()) then
|
||||
vehicle = GetPlayersLastVehicle(PlayerPedId())
|
||||
end
|
||||
ESX.Game.SetVehicleProperties(vehicle, myCar)
|
||||
if not (myCar.modTurbo) then
|
||||
ToggleVehicleMod(vehicle, 18, false)
|
||||
ToggleVehicleMod(vehicle, 18, false)
|
||||
end
|
||||
if not (myCar.modXenon) then
|
||||
ToggleVehicleMod(vehicle, 22, false)
|
||||
ToggleVehicleMod(vehicle, 22, false)
|
||||
end
|
||||
if not (myCar.windowTint) then
|
||||
SetVehicleWindowTint(vehicle, 0)
|
||||
SetVehicleWindowTint(vehicle, 0)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user