mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
feat(es_extended/client/modules/actions): track vehicle seat
This commit is contained in:
@@ -130,6 +130,20 @@ function Actions:TrackVehicle()
|
||||
end
|
||||
elseif self.inVehicle then
|
||||
self:ExitVehicle()
|
||||
self:TrackSeat()
|
||||
end
|
||||
end
|
||||
|
||||
function Actions:TrackSeat()
|
||||
if not self.inVehicle then
|
||||
return
|
||||
end
|
||||
|
||||
local newSeat = self:GetSeatPedIsIn()
|
||||
if newSeat ~= self.seat then
|
||||
self.seat = newSeat
|
||||
ESX.SetPlayerData("seat", self.seat)
|
||||
TriggerEvent("esx:vehicleSeatChanged", self.seat)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user