From 8321f3356d5838afa8ca128022eff380741f6a99 Mon Sep 17 00:00:00 2001 From: Mycroft Date: Fri, 23 Sep 2022 01:51:23 +0100 Subject: [PATCH] tweak(esx_vehicleshop): Uniform prints --- [esx_addons]/esx_vehicleshop/client/main.lua | 4 ++-- [esx_addons]/esx_vehicleshop/server/main.lua | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/[esx_addons]/esx_vehicleshop/client/main.lua b/[esx_addons]/esx_vehicleshop/client/main.lua index 36a33d45..8e76121f 100644 --- a/[esx_addons]/esx_vehicleshop/client/main.lua +++ b/[esx_addons]/esx_vehicleshop/client/main.lua @@ -120,7 +120,7 @@ end function OpenShopMenu() if #Vehicles == 0 then - print('[esx_vehicleshop] [^3ERROR^7] No vehicles found') + print('[^3ERROR^7] Vehicleshop has ^50^7 vehicles, please add some!') return end @@ -147,7 +147,7 @@ function OpenShopMenu() if IsModelInCdimage(joaat(Vehicles[i].model)) then table.insert(vehiclesByCategory[Vehicles[i].category], Vehicles[i]) else - print(('[esx_vehicleshop] [^3ERROR^7] Vehicle "%s" does not exist'):format(Vehicles[i].model)) + print(('[^3WARNING^7] Ignoring vehicle ^5%s^7 due to invalid Model'):format(Vehicles[i].model)) end end diff --git a/[esx_addons]/esx_vehicleshop/server/main.lua b/[esx_addons]/esx_vehicleshop/server/main.lua index 8f76cac9..921aabd2 100644 --- a/[esx_addons]/esx_vehicleshop/server/main.lua +++ b/[esx_addons]/esx_vehicleshop/server/main.lua @@ -9,7 +9,7 @@ CreateThread(function() if Config.PlateUseSpace then char = char + 1 end if char > 8 then - print(('[esx_vehicleshop] [^3WARNING^7] Plate character count reached, %s/8 characters!'):format(char)) + print(('[^3WARNING^7] Character Limit Exceeded, ^5%s/8^7!'):format(char)) end end) @@ -235,7 +235,7 @@ AddEventHandler('esx_vehicleshop:returnProvider', function(vehicleModel) end end) else - print(('[esx_vehicleshop] [^3WARNING^7] %s attempted selling an invalid vehicle!'):format(xPlayer.identifier)) + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Sell Invalid Vehicle - ^5%s^7!'):format(source, vehicleModel)) end end) end @@ -291,7 +291,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function(source, cb, end if not resellPrice then - print(('[esx_vehicleshop] [^3WARNING^7] %s attempted to sell an unknown vehicle!'):format(xPlayer.identifier)) + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Invalid Vehicle - ^5%s^7!'):format(source, model)) cb(false) else MySQL.single('SELECT * FROM rented_vehicles WHERE plate = ?', {plate}, @@ -310,11 +310,11 @@ ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function(source, cb, RemoveOwnedVehicle(plate) cb(true) else - print(('[esx_vehicleshop] [^3WARNING^7] %s attempted to sell an vehicle with plate mismatch!'):format(xPlayer.identifier)) + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Vehicle With Invalid Plate - ^5%s^7!'):format(source, plate)) cb(false) end else - print(('[esx_vehicleshop] [^3WARNING^7] %s attempted to sell an vehicle with model mismatch!'):format(xPlayer.identifier)) + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Vehicle With Invalid Model - ^5%s^7!'):format(source, model)) cb(false) end end @@ -361,14 +361,14 @@ AddEventHandler('esx_vehicleshop:setJobVehicleState', function(plate, state) MySQL.update('UPDATE owned_vehicles SET `stored` = ? WHERE plate = ? AND job = ?', {state, plate, xPlayer.job.name}, function(rowsChanged) if rowsChanged == 0 then - print(('[esx_vehicleshop] [^3WARNING^7] %s exploited the garage!'):format(xPlayer.identifier)) + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Exploit the Garage!'):format(source, plate)) end end) end) function PayRent() local timeStart = os.clock() - print('[esx_vehicleshop] [^2INFO^7] Paying rent cron job started') + print('[^2INFO^7] ^5Rent Payments^7 Initiated') MySQL.query('SELECT rented_vehicles.owner, rented_vehicles.rent_price, rented_vehicles.plate, users.accounts FROM rented_vehicles LEFT JOIN users ON rented_vehicles.owner = users.identifier', {}, function(rentals) @@ -452,7 +452,7 @@ function PayRent() MySQL.prepare.await('DELETE FROM rented_vehicles WHERE owner = ? AND plate = ?', unrentals) end - print(('[esx_vehicleshop] [^2INFO^7] Paying rent cron job took %s seconds'):format(os.clock() - timeStart)) + print(('[^2INFO^7] ^5Rent Payments^7 took ^5%s^7 ms to execute'):format(ESX.Math.Round((os.time() - time) / 1000000, 2))) end) end