mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat: improved RedM support (#162)
* Improvements + remove redm keybind system as it's pointless
This commit is contained in:
8
resource/cache/client.lua
vendored
8
resource/cache/client.lua
vendored
@@ -13,6 +13,8 @@ end
|
||||
local GetVehiclePedIsIn = GetVehiclePedIsIn
|
||||
local GetPedInVehicleSeat = GetPedInVehicleSeat
|
||||
local GetVehicleMaxNumberOfPassengers = GetVehicleMaxNumberOfPassengers
|
||||
local GetMount = GetMount
|
||||
local IsPedOnMount = IsPedOnMount
|
||||
local GetCurrentPedWeapon = GetCurrentPedWeapon
|
||||
|
||||
CreateThread(function()
|
||||
@@ -38,6 +40,12 @@ CreateThread(function()
|
||||
cache:set('seat', false)
|
||||
end
|
||||
|
||||
if cache.game == 'redm' then
|
||||
local mount = GetMount(ped)
|
||||
local onMount = IsPedOnMount(ped)
|
||||
cache:set('mount', onMount and mount or false)
|
||||
end
|
||||
|
||||
local hasWeapon, currentWeapon = GetCurrentPedWeapon(ped, true)
|
||||
|
||||
cache:set('weapon', hasWeapon and currentWeapon or false)
|
||||
|
||||
Reference in New Issue
Block a user