diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index 70869de4..0c851b5f 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -75,6 +75,15 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin) end end + if Config.DisableVehicleSeatShuff then + AddEventHandler('esx:enteredVehicle', function(vehicle, plate, seat) + if seat == 0 then + SetPedIntoVehicle(ESX.PlayerData.ped, vehicle, 0) + SetPedConfigFlag(ESX.PlayerData.ped, 184, true) + end + end) + end + if Config.DisableHealthRegeneration or Config.DisableWeaponWheel or Config.DisableAimAssist or Config.DisableVehicleRewards then CreateThread(function() while true do diff --git a/[core]/es_extended/client/modules/actions.lua b/[core]/es_extended/client/modules/actions.lua index 4123c485..95e14130 100644 --- a/[core]/es_extended/client/modules/actions.lua +++ b/[core]/es_extended/client/modules/actions.lua @@ -72,12 +72,6 @@ CreateThread(function() current.displayName, current.netId = GetData(current.vehicle) TriggerEvent('esx:enteredVehicle', current.vehicle, current.plate, current.seat, current.displayName, current.netId) TriggerServerEvent('esx:enteredVehicle', current.plate, current.seat, current.displayName, current.netId) - if Config.DisableVehicleSeatShuff then - if current.seat == 0 then - SetPedIntoVehicle(playerPed, current.vehicle, 0) - SetPedConfigFlag(playerPed, 184, true) - end - end end elseif isInVehicle then if not IsPedInAnyVehicle(playerPed, false) or IsPlayerDead(PlayerId()) then