Skip to content

Commit

Permalink
tweak: Send warn log every run
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan2139 committed Dec 31, 2024
1 parent 32695ac commit 41cbcdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sonorancad/submodules/vehreg/sv_vehreg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CreateThread(function()
Config.LoadPlugin('vehreg', function(pluginConfig)
if pluginConfig.enabled then
local civData = {}
local notSetConfig = false
local placeholderReplace = function(message, placeholderTable)
for k, v in pairs(placeholderTable) do
message = message:gsub(k, v)
Expand Down Expand Up @@ -74,6 +75,7 @@ CreateThread(function()
end)
Citizen.Wait(1000)
if not pluginConfig.recordData then
notSetConfig = true
pluginConfig.recordData = {
colorUid = "color",
plateUid = "plate",
Expand All @@ -84,6 +86,9 @@ CreateThread(function()
}
warnLog('Record data not found in configuration. Using default values. Please update your configuration using the vehreg_config.dist.lua file located in the configuration folder')
end
if notSetConfig then
warnLog('Record data not found in configuration. Using default values. Please update your configuration using the vehreg_config.dist.lua file located in the configuration folder')
end
local replaceValues = {
[pluginConfig.recordData.colorUid] = primary,
[pluginConfig.recordData.plateUid] = plate,
Expand Down

0 comments on commit 41cbcdb

Please sign in to comment.