Skip to content

Commit

Permalink
Update c_testing.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-A-Rocha committed Jul 31, 2024
1 parent 1082d10 commit 2a14c6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions newmodels_reborn/optional/c_testing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ local function drawDebug()
dxDrawText(drawStr, SW/2, 30, SW, 0, 0xFFFFFFFF, 1, "default-bold")
end

addCommandHandler("newmodelsdebug", function(cmd)
local function toggleDebugView(cmd)
if not enabled then
if not (debugTimer) or (not isTimer(debugTimer)) then debugTimer = setTimer(updateDebugStr, 1000, 0) end
addEventHandler("onClientRender", root, drawDebug, false)
Expand All @@ -70,4 +70,6 @@ addCommandHandler("newmodelsdebug", function(cmd)
end
enabled = not enabled
outputChatBox(cmd .. " => " .. tostring(enabled))
end, false)
end
addCommandHandler("newmodelsdebug", toggleDebugView, false)
executeCommandHandler("newmodelsdebug")

0 comments on commit 2a14c6f

Please sign in to comment.