From 038e870b1fb3fe3af4054f371d638a79f08a5c54 Mon Sep 17 00:00:00 2001 From: Matin Date: Fri, 12 Dec 2025 14:27:55 +0330 Subject: [PATCH] (FEAT) Also update seat cache while player is mounted --- resource/cache/client.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resource/cache/client.lua b/resource/cache/client.lua index bb8453941..4f70a2a4c 100644 --- a/resource/cache/client.lua +++ b/resource/cache/client.lua @@ -25,6 +25,7 @@ local GetVehicleMaxNumberOfPassengers = GetVehicleMaxNumberOfPassengers local GetMount = GetMount local IsPedOnMount = IsPedOnMount local GetCurrentPedWeapon = GetCurrentPedWeapon +local GetSeatPedIsUsing = GetSeatPedIsUsing CreateThread(function() while true do @@ -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)