Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions resource/cache/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ local GetVehicleMaxNumberOfPassengers = GetVehicleMaxNumberOfPassengers
local GetMount = GetMount
local IsPedOnMount = IsPedOnMount
local GetCurrentPedWeapon = GetCurrentPedWeapon
local GetSeatPedIsUsing = GetSeatPedIsUsing

CreateThread(function()
while true do
Expand Down Expand Up @@ -60,6 +61,14 @@ CreateThread(function()
local mount = GetMount(ped)
local onMount = IsPedOnMount(ped)
cache:set('mount', onMount and mount or false)

if onMount then
cache:set('mount', mount)
cache:set('seat', GetSeatPedIsUsing(ped))
else
cache:set('mount', false)
cache:set('seat', false)
end
end

local hasWeapon, currentWeapon = GetCurrentPedWeapon(ped, true)
Expand Down