tweak(esx_society_: Uniform Prints

This commit is contained in:
Mycroft
2022-09-23 01:35:55 +01:00
parent f5afa2d596
commit a788380ef7
+13 -13
View File
@@ -63,7 +63,7 @@ AddEventHandler('esx_society:withdrawMoney', function(societyName, amount)
local source = source
local society = GetSociety(societyName)
if not society then
print(('[^3WARNING^7] %s attempted to withdraw from non-existing society %s!'):format(xPlayer.getName(), societyName))
print(('[^3WARNING^7] Player ^5%s^7 attempted to withdraw from non-existing society - ^5%s^7!'):format(source, societyName))
return
end
local xPlayer = ESX.GetPlayerFromId(source)
@@ -79,7 +79,7 @@ AddEventHandler('esx_society:withdrawMoney', function(societyName, amount)
end
end)
else
print(('esx_society: %s attempted to call withdrawMoney!'):format(xPlayer.identifier))
print(('[^3WARNING^7] Player ^5%s^7 attempted to withdraw from society - ^5%s^7!'):format(source, society.name))
end
end)
@@ -89,7 +89,7 @@ AddEventHandler('esx_society:depositMoney', function(societyName, amount)
local xPlayer = ESX.GetPlayerFromId(source)
local society = GetSociety(societyName)
if not society then
print(('[^3WARNING^7] %s attempted to deposit to non-existing society %s!'):format(xPlayer.getName(), societyName))
print(('[^3WARNING^7] Player ^5%s^7 attempted to deposit to non-existing society - ^5%s^7!'):format(source, societyName))
return
end
amount = ESX.Math.Round(tonumber(amount))
@@ -105,7 +105,7 @@ AddEventHandler('esx_society:depositMoney', function(societyName, amount)
xPlayer.showNotification(_U('invalid_amount'))
end
else
print(('esx_society: %s attempted to call depositMoney!'):format(xPlayer.identifier))
print(('[^3WARNING^7] Player ^5%s^7 attempted to deposit to society - ^5%s^7!'):format(source, society.name))
end
end)
@@ -128,7 +128,7 @@ AddEventHandler('esx_society:washMoney', function(society, amount)
xPlayer.showNotification(_U('invalid_amount'))
end
else
print(('esx_society: %s attempted to call washMoney!'):format(xPlayer.identifier))
print(('[^3WARNING^7] Player ^5%s^7 attempted to wash money in society - ^5%s^7!'):format(source, society))
end
end)
@@ -138,7 +138,7 @@ AddEventHandler('esx_society:putVehicleInGarage', function(societyName, vehicle)
local xPlayer = ESX.GetPlayerFromId(source)
local society = GetSociety(societyName)
if not society then
print(('[^3WARNING^7] %s attempted to put a vehicle in a non-existing society - %s!'):format(xPlayer.getName(), societyName))
print(('[^3WARNING^7] Player ^5%s^7 attempted to put vehicle in non-existing society garage - ^5%s^7!'):format(source, societyName))
return
end
TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store)
@@ -154,7 +154,7 @@ AddEventHandler('esx_society:removeVehicleFromGarage', function(societyName, veh
local xPlayer = ESX.GetPlayerFromId(source)
local society = GetSociety(societyName)
if not society then
print(('[^3WARNING^7] %s attempted to Remove a vehicle in a non-existing society - %s!'):format(xPlayer.getName(), societyName))
print(('[^3WARNING^7] Player ^5%s^7 attempted to remove vehicle from non-existing society garage - ^5%s^7!'):format(source, societyName))
return
end
TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store)
@@ -174,7 +174,7 @@ end)
ESX.RegisterServerCallback('esx_society:getSocietyMoney', function(source, cb, societyName)
local society = GetSociety(societyName)
if not society then
print(('[^3WARNING^7] Attempting To get a non-existing society - %s!'):format(societyName))
print(('[^3WARNING^7] Player ^5%s^7 attempted to get money from non-existing society - ^5%s^7!'):format(source, societyName))
return
end
if society then
@@ -275,9 +275,9 @@ end)
ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade, type)
local xPlayer = ESX.GetPlayerFromId(source)
local isBoss = xPlayer.job.grade_name == 'boss'
local xTarget = ESX.GetPlayerFromIdentifier(identifier)
if isBoss then
local xTarget = ESX.GetPlayerFromIdentifier(identifier)
if xTarget then
xTarget.setJob(job, grade)
@@ -301,7 +301,7 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier
end)
end
else
print(('esx_society: %s attempted to setJob'):format(xPlayer.identifier))
print(('[^3WARNING^7] Player ^5%s^7 attempted to setJob for Player ^5%s^7!'):format(source, xTarget.source))
cb()
end
end)
@@ -327,11 +327,11 @@ ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job,
cb()
end)
else
print(('esx_society: %s attempted to setJobSalary over config limit!'):format(xPlayer.identifier))
print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary over the config limit for ^5%s^7!'):format(source, job))
cb()
end
else
print(('esx_society: %s attempted to setJobSalary'):format(xPlayer.identifier))
print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary for ^5%s^7!'):format(source, job))
cb()
end
end)
@@ -356,7 +356,7 @@ ESX.RegisterServerCallback('esx_society:setJobLabel', function(source, cb, job,
cb()
end)
else
print(('esx_society: %s attempted to setJobSalary'):format(xPlayer.identifier))
print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobLabel for ^5%s^7!'):format(source, job))
cb()
end
end)