mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
new esx:pauseMenuActive handler
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local isInVehicle, isEnteringVehicle, isJumping = false, false, false
|
||||
local isInVehicle, isEnteringVehicle, isJumping, inPauseMenu = false, false, false, false
|
||||
local currentVehicle, currentSeat = 0, 0
|
||||
local playerPed = PlayerPedId()
|
||||
|
||||
@@ -33,6 +33,15 @@ CreateThread(function()
|
||||
isJumping = false
|
||||
end
|
||||
|
||||
if IsPauseMenuActive() and not inPauseMenu then
|
||||
inPauseMenu = true
|
||||
TriggerEvent('esx:pauseMenuActive', inPauseMenu)
|
||||
elseif not IsPauseMenuActive() and inPauseMenu then
|
||||
inPauseMenu = false
|
||||
TriggerEvent('esx:pauseMenuActive', inPauseMenu)
|
||||
end
|
||||
|
||||
|
||||
if not isInVehicle and not IsPlayerDead(PlayerId()) then
|
||||
if DoesEntityExist(GetVehiclePedIsTryingToEnter(playerPed)) and not isEnteringVehicle then
|
||||
-- trying to enter a vehicle!
|
||||
|
||||
Reference in New Issue
Block a user