Skip to content

Commit

Permalink
refactor(client/debug): always define debug event
Browse files Browse the repository at this point in the history
It's just a generally useful event and is nice when testing other scripts.
  • Loading branch information
thelindat committed Nov 8, 2022
1 parent 9713315 commit b3708d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/debug.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Debug = GetConvarInt('ox_target:debug', 0) == 1
if not Debug then return end

AddEventHandler('ox_target:debug', function(data)
if data.entity then
data.archetype = GetEntityArchetypeName(data.entity)
Expand All @@ -10,6 +7,9 @@ AddEventHandler('ox_target:debug', function(data)
print(json.encode(data, {indent=true}))
end)

Debug = GetConvarInt('ox_target:debug', 0) == 1
if not Debug then return end

local ox_target = exports.ox_target
local drawZones = true

Expand Down

0 comments on commit b3708d9

Please sign in to comment.