Skip to content

Commit 073ad59

Browse files
committed
Refactor vehicle functions to xLib.vehicle module
Moved all vehicle-related functions from es_extended/client/functions.lua to a new [core]/esx_lib/imports/vehicle/client.lua module under xLib.vehicle. Updated compat.lua to reference xLib.vehicle for vehicle operations, improving modularity and maintainability.
1 parent 81be82f commit 073ad59

File tree

3 files changed

+594
-547
lines changed

3 files changed

+594
-547
lines changed

[core]/es_extended/client/compat.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,14 @@ end
2626
ESX.Game.GetClosestEntity = xLib.entity.closest
2727
EnumerateEntitiesWithinDistance = xLib.entity.EnumerateWithinDistance
2828
ESX.Game.Teleport = xLib.entity.Teleport
29+
30+
ESX.Game.DeleteVehicle = xLib.vehicle.Delete
31+
ESX.Game.SpawnVehicle = xLib.vehicle.Spawn
32+
ESX.Game.SpawnLocalVehicle = xLib.vehicle.Spawn(vehicle, coords, heading, cb, false)
33+
ESX.Game.IsVehicleEmpty = xLib.vehicle.IsEmpty
34+
ESX.Game.GetClosestVehicle = xLib.vehicle.Closest
35+
ESX.Game.GetVehiclesInArea = xLib.vehicle.EnumerateWithinDistance
36+
ESX.Game.IsSpawnPointClear = xLib.vehicle.IsSpawnPointClear
37+
ESX.Game.GetVehicleInDirection = xLib.vehicle.GetInDirection
38+
ESX.Game.GetVehicleProperties = xLib.vehicle.GetProperties
39+
ESX.Game.SetVehicleProperties = xLib.vehicle.SetProperties

0 commit comments

Comments
 (0)