From ef2ba3ea7a1a92117823477f0a161facd4944223 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Fri, 19 Jan 2024 20:24:25 +0000 Subject: [PATCH] tidy up new prints more --- crafting.lua | 4 ++-- functions.lua | 2 +- wrapper.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crafting.lua b/crafting.lua index c4cfa6c..4e20ef1 100644 --- a/crafting.lua +++ b/crafting.lua @@ -274,10 +274,10 @@ function hasItem(items, amount, src) local amount = amount and amount or 1 end end if count >= amount then - if Config.System.Debug then print("^6Bridge^7: ^3HasItem^7: ^7[^6"..foundInv.."^7] ^5FOUND^7 '"..tostring(item).."' ^3"..count.."^7/^3"..amount.."^7") end + if Config.System.Debug then print("^6Bridge^7: ^3HasItem^7[^6"..foundInv.."^7]: "..tostring(item).." ^3"..count.."^7/^3"..amount.." ^5FOUND^7") end hasTable[item] = { hasItem = true, count = count, } else - if Config.System.Debug then print("^6Bridge^7: ^3HasItem^7: ^7[^6"..foundInv.."^7] ^1NOT FOUND^7 '"..tostring(item).."' ^1"..count.."^7/^3"..amount.."^7") end + if Config.System.Debug then print("^6Bridge^7: ^3HasItem^7[^6"..foundInv.."^7]: "..tostring(item).." ^1"..count.."^7/^3"..amount.." ^1NOT FOUND^7") end hasTable[item] = { hasItem = false, count = count, } end end diff --git a/functions.lua b/functions.lua index de5a59f..7ef5b38 100644 --- a/functions.lua +++ b/functions.lua @@ -11,7 +11,7 @@ end local time = 100 function loadModel(model) if not HasModelLoaded(model) then if Config.System.Debug then print("^6Bridge^7: ^2Loading Model^7: '^6"..model.."^7'") end - while not HasModelLoaded(model) do if time > 0 then time = time - 1 RequestModel(model) + while not HasModelLoaded(model) do if time > 0 then time -= 1 RequestModel(model) else time = 1000 print("^6Bridge^7: ^3LoadModel^7: ^2Timed out loading model ^7'^6"..model.."^7'") break end Wait(10) end end diff --git a/wrapper.lua b/wrapper.lua index 730aa74..ca68ffa 100644 --- a/wrapper.lua +++ b/wrapper.lua @@ -954,7 +954,7 @@ AddStateBagChangeHandler(GetCurrentResourceName()..':setVehicleProperties', '', if not value or not GetEntityFromStateBagName then return end local entity = GetEntityFromStateBagName(bagName) local networked = not bagName:find('localEntity') - if Config.System.Debug then print("^6Bridge^7: ^2Setting Vehicle Properties ^7[^6"..OXLibExport.."^7] - [^3"..entity.."]^7 - [^3"..GetEntityModel(entity).."^7] - [^3"..value.plate.."^7]") end + if Config.System.Debug then print("^6Bridge^7: ^2Setting Vehicle Properties ^7[^6"..OXLibExport.."^7] - [^3"..entity.."^7] - [^3"..GetEntityModel(entity).."^7] - [^3"..value.plate.."^7]") end if networked and NetworkGetEntityOwner(entity) ~= cache.playerId then return end