Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #94 from Jordan2139/master
Browse files Browse the repository at this point in the history
v2.9.32 - Resolve "sonoran debugmode" command error
  • Loading branch information
Fireant456 authored Aug 30, 2024
2 parents 77cd951 + 57a757b commit 6fa0d18
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
16 changes: 11 additions & 5 deletions sonorancad/core/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--[[ /sonoran
debugmode - old caddebug toggle
info - dump version info, configuration
support - dump useful data for support staff
support - dump useful data for support staff
verify - run hash checks to confirm all files are untampered
plugin <name> - show info about a plugin (config)
update - attempt to auto-update
Expand All @@ -35,7 +35,7 @@ function dumpInfo()
for k, v in pairs(Config) do
if (k == "plugins") then goto continue end
if type(v) == "function" then goto continue end
if type(v) == "table" then
if type(v) == "table" then
table.insert(coreConfig, ("%s = %s"):format(k, json.encode(v)))
goto continue
end
Expand Down Expand Up @@ -134,7 +134,7 @@ RegisterCommand("sonoran", function(source, args, rawCommand)
SonoranCAD Help
debugmode - Toggles debugging mode
info - dump version info, configuration
support - dump useful data for support staff
support - dump useful data for support staff
errors - display all error/warning messages since last startup
plugin <name> - show info about a plugin (config)
update - Run core updater
Expand All @@ -145,8 +145,14 @@ SonoranCAD Help
]])
elseif args[1] == "debugmode" then
Config.debugMode = not Config.debugMode
SetConvar("sonoran_debugMode", Config.debugMode)
infoLog(("Debug mode toggled to %s"):format(Config.debugMode))
local convarString = ""
if Config.debugMode then
convarString = "true"
else
convarString = "false"
end
SetConvar("sonoran_debugMode", convarString)
infoLog(("Debug mode toggled to %s"):format(convarString))
TriggerClientEvent("SonoranCAD::core:debugModeToggle", -1, Config.debugMode)
elseif args[1] == "info" then
print(dumpInfo())
Expand Down
2 changes: 1 addition & 1 deletion sonorancad/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ games {'gta5'}

author 'Sonoran CAD'
description 'Sonoran CAD FiveM Integration'
version '2.9.31'
version '2.9.32'

server_scripts {
'core/http.js'
Expand Down
2 changes: 1 addition & 1 deletion sonorancad/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"resource" : "2.9.31",
"resource" : "2.9.32",
"testedFxServerVersion": "5932"
}

0 comments on commit 6fa0d18

Please sign in to comment.