Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(es_extended/client/actions): add debug prints #1551

Merged
merged 1 commit into from
Dec 15, 2024
Merged
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
32 changes: 32 additions & 0 deletions [core]/es_extended/client/modules/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function Actions:TrackPed()
ESX.SetPlayerData("ped", newPed)

TriggerEvent("esx:playerPedChanged", newPed)

if Config.EnableDebug then
print("[DEBUG] Player ped changed:", newPed)
end
end
end

Expand All @@ -58,6 +62,10 @@ function Actions:TrackPauseMenu()
if isActive ~= self.inPauseMenu then
self.inPauseMenu = isActive
TriggerEvent("esx:pauseMenuActive", isActive)

if Config.EnableDebug then
print("[DEBUG] Pause menu active:", isActive)
end
end
end

Expand All @@ -71,6 +79,10 @@ function Actions:EnterVehicle()
TriggerServerEvent("esx:enteringVehicle", plate, self.seat, netId)

self:SetVehicleStatus()

if Config.EnableDebug then
print("[DEBUG] Entering vehicle:", self.vehicle, plate, self.seat, netId)
end
end

function Actions:ResetVehicleData()
Expand All @@ -87,6 +99,10 @@ function Actions:EnterAborted()

TriggerEvent("esx:enteringVehicleAborted")
TriggerServerEvent("esx:enteringVehicleAborted")

if Config.EnableDebug then
print("[DEBUG] Entering vehicle aborted")
end
end

function Actions:WarpEnter()
Expand All @@ -100,6 +116,10 @@ function Actions:WarpEnter()
self:SetVehicleStatus()
TriggerEvent("esx:enteredVehicle", self.vehicle, plate, self.seat, displayName, netId)
TriggerServerEvent("esx:enteredVehicle", plate, self.seat, displayName, netId)

if Config.EnableDebug then
print("[DEBUG] Entered vehicle:", self.vehicle, plate, self.seat, displayName, netId)
end
end

function Actions:ExitVehicle()
Expand All @@ -111,6 +131,10 @@ function Actions:ExitVehicle()
TriggerEvent("esx:exitedVehicle", self.vehicle, plate, self.seat, displayName, netId)
TriggerServerEvent("esx:exitedVehicle", plate, self.seat, displayName, netId)

if Config.EnableDebug then
print("[DEBUG] Exited vehicle:", self.vehicle, plate, self.seat, displayName, netId)
end

self:ResetVehicleData()
end
end
Expand Down Expand Up @@ -144,6 +168,10 @@ function Actions:TrackSeat()
self.seat = newSeat
ESX.SetPlayerData("seat", self.seat)
TriggerEvent("esx:vehicleSeatChanged", self.seat)

if Config.EnableDebug then
print("[DEBUG] Vehicle seat changed:", self.seat)
end
end
end

Expand All @@ -156,6 +184,10 @@ function Actions:TrackWeapon()
self.currentWeapon = newWeapon
ESX.SetPlayerData("weapon", self.currentWeapon)
TriggerEvent("esx:weaponChanged", self.currentWeapon)

if Config.EnableDebug then
print("[DEBUG] Weapon changed:", self.currentWeapon)
end
end
end

Expand Down
Loading