feat: improved RedM support (#162)

* Improvements + remove redm keybind system as it's pointless
This commit is contained in:
Scully
2022-11-25 18:05:55 -08:00
committed by GitHub
parent ed7c04ac9c
commit 231d1c3c77
13 changed files with 60 additions and 19 deletions

View File

@@ -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)