feat: improved RedM support (#162)

* Improvements + remove redm keybind system as it's pointless
This commit is contained in:
Scully authored and GitHub committed 2022-11-26 13:05:55 +11:00
1 parent ed7c04ac9c
commit 231d1c3c77
13 files changed
+60 -19

No files matched your search

+8
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)