mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 01:38:52 +00:00
chore(legacy): Remove resource name print; fix typos
This commit is contained in:
+1
-1
@@ -168,7 +168,7 @@ ESX.RegisterCommand('sv_restart', "admin", function(xPlayer, args, showError)
|
||||
for _, playerId in ipairs(GetPlayers()) do
|
||||
DropPlayer(playerId, "Server Restart")
|
||||
end
|
||||
print('[^5es_extended^0] ^2[INFO] ^1 Server Restarting, Please Wait :)')
|
||||
print('^2[INFO] ^1 Server Restarting, Please Wait :)')
|
||||
crash = true
|
||||
while crash do
|
||||
end
|
||||
|
||||
+4
-4
@@ -41,26 +41,26 @@ MySQL.ready(function()
|
||||
if ESX.Jobs[v.job_name] then
|
||||
ESX.Jobs[v.job_name].grades[tostring(v.grade)] = v
|
||||
else
|
||||
print(('[^5es_extended^0] [^3WARNING^7] Ignoring job grades for ^5"%s"^0 due to missing job'):format(v.job_name))
|
||||
print(('[^3WARNING^7] Ignoring job grades for ^5"%s"^0 due to missing job'):format(v.job_name))
|
||||
end
|
||||
end
|
||||
|
||||
for k2,v2 in pairs(ESX.Jobs) do
|
||||
if ESX.Table.SizeOf(v2.grades) == 0 then
|
||||
ESX.Jobs[v2.name] = nil
|
||||
print(('[^5es_extended^0] [^3WARNING^7] Ignoring job ^5"%s"^0due to no job grades found'):format(v2.name))
|
||||
print(('[^3WARNING^7] Ignoring job ^5"%s"^0due to no job grades found'):format(v2.name))
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
print('[^5es_extended^0] [^2INFO^7] ESX ^5Legacy^0 initialized')
|
||||
print('[^2INFO^7] ESX ^5Legacy^0 initialized')
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx:clientLog')
|
||||
AddEventHandler('esx:clientLog', function(msg)
|
||||
if Config.EnableDebug then
|
||||
print(('[^5es_extended^0] [^2TRACE^7] %s^7'):format(msg))
|
||||
print(('[^2TRACE^7] %s^7'):format(msg))
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ESX.Trace = function(msg)
|
||||
if Config.EnableDebug then
|
||||
print(('[^5es_extended^0] [^2TRACE^7] %s^7'):format(msg))
|
||||
print(('[^2TRACE^7] %s^7'):format(msg))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion)
|
||||
end
|
||||
|
||||
if ESX.RegisteredCommands[name] then
|
||||
print(('[^5es_extended^0] [^3WARNING^7] Command ^5"%s" already registered, overriding command'):format(name))
|
||||
print(('[^3WARNING^7] Command ^5"%s" already registered, overriding command'):format(name))
|
||||
|
||||
if ESX.RegisteredCommands[name].suggestion then
|
||||
TriggerClientEvent('chat:removeSuggestion', -1, ('/%s'):format(name))
|
||||
@@ -50,7 +50,7 @@ ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion)
|
||||
local command = ESX.RegisteredCommands[name]
|
||||
|
||||
if not command.allowConsole and playerId == 0 then
|
||||
print(('[^5es_extended^0] [^3WARNING^7] ^5%s'):format(_U('commanderror_console')))
|
||||
print(('[^3WARNING^7] ^5%s'):format(_U('commanderror_console')))
|
||||
else
|
||||
local xPlayer, error = ESX.GetPlayerFromId(playerId), nil
|
||||
|
||||
@@ -122,14 +122,14 @@ ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion)
|
||||
|
||||
if error then
|
||||
if playerId == 0 then
|
||||
print(('[^5es_extended^0] [^3WARNING^7] %s^7'):format(error))
|
||||
print(('[^3WARNING^7] %s^7'):format(error))
|
||||
else
|
||||
xPlayer.triggerEvent('chat:addMessage', {args = {'^1SYSTEM', error}})
|
||||
end
|
||||
else
|
||||
cb(xPlayer or false, args, function(msg)
|
||||
if playerId == 0 then
|
||||
print(('[^5es_extended^0] [^3WARNING^7] %s^7'):format(msg))
|
||||
print(('[^3WARNING^7] %s^7'):format(msg))
|
||||
else
|
||||
xPlayer.triggerEvent('chat:addMessage', {args = {'^1SYSTEM', msg}})
|
||||
end
|
||||
@@ -159,7 +159,7 @@ ESX.TriggerServerCallback = function(name, requestId, source, cb, ...)
|
||||
if ESX.ServerCallbacks[name] then
|
||||
ESX.ServerCallbacks[name](source, cb, ...)
|
||||
else
|
||||
print(('[^5es_extended^0] [^3WARNING^7] Server callback ^5"%s"^0 does not exist. ^1Please Check The Server File for Errors!'):format(name))
|
||||
print(('[^3WARNING^7] Server callback ^5"%s"^0 does not exist. ^1Please Check The Server File for Errors!'):format(name))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -182,7 +182,7 @@ ESX.SavePlayer = function(xPlayer, cb)
|
||||
end)
|
||||
|
||||
Async.parallel(asyncTasks, function(results)
|
||||
print(('[^5es_extended^0] [^2INFO^7] Saved player ^5"%s^7"'):format(xPlayer.getName()))
|
||||
print(('[^2INFO^7] Saved player ^5"%s^7"'):format(xPlayer.getName()))
|
||||
|
||||
if cb then
|
||||
cb()
|
||||
@@ -201,7 +201,7 @@ ESX.SavePlayers = function(cb)
|
||||
end
|
||||
|
||||
Async.parallelLimit(asyncTasks, 8, function(results)
|
||||
print(('[^5es_extended^0] [^2INFO^7] Saved ^5%s^0 player(s)'):format(#xPlayers))
|
||||
print(('[^2INFO^7] Saved ^5%s^0 player(s)'):format(#xPlayers))
|
||||
if cb then
|
||||
cb()
|
||||
end
|
||||
|
||||
+6
-6
@@ -30,7 +30,7 @@ function onPlayerJoined(playerId)
|
||||
end
|
||||
|
||||
if IsPlayerAceAllowed(playerId, "command") then
|
||||
print(('[^5es_extended^0] ^2[INFO] ^0 Player ^5%s ^0Has been granted admin permissions via ^5Ace Perms.^7'):format(playerId))
|
||||
print(('^2[INFO] ^0 Player ^5%s ^0Has been granted admin permissions via ^5Ace Perms.^7'):format(playerId))
|
||||
defaultGroup = "admin"
|
||||
else
|
||||
defaultGroup = "user"
|
||||
@@ -108,7 +108,7 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
if ESX.DoesJobExist(job, grade) then
|
||||
jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade]
|
||||
else
|
||||
print(('[^5es_extended^0] [^3WARNING^7] Ignoring invalid job for %s [job: %s, grade: %s]'):format(identifier, job, grade))
|
||||
print(('[^3WARNING^7] Ignoring invalid job for %s [job: %s, grade: %s]'):format(identifier, job, grade))
|
||||
job, grade = 'unemployed', '0'
|
||||
jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade]
|
||||
end
|
||||
@@ -138,7 +138,7 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
if item then
|
||||
foundItems[name] = count
|
||||
else
|
||||
print(('[^5es_extended^0] [^3WARNING^7] Ignoring invalid item "%s" for "%s"'):format(name, identifier))
|
||||
print(('[^3WARNING^7] Ignoring invalid item "%s" for "%s"'):format(name, identifier))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -199,7 +199,7 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
if result[1].position and result[1].position ~= '' then
|
||||
userData.coords = json.decode(result[1].position)
|
||||
else
|
||||
print('[^5es_extended^0] [^3WARNING^7] Column ^5"position"^0 in ^5"users"^0 table is missing required default value. Using backup coords, fix your database.')
|
||||
print('[^3WARNING^7] Column ^5"position"^0 in ^5"users"^0 table is missing required default value. Using backup coords, fix your database.')
|
||||
userData.coords = {x = -269.4, y = -955.3, z = 31.2, heading = 205.8}
|
||||
end
|
||||
|
||||
@@ -225,7 +225,7 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
|
||||
xPlayer.triggerEvent('esx:createMissingPickups', ESX.Pickups)
|
||||
xPlayer.triggerEvent('esx:registerSuggestions', ESX.RegisteredCommands)
|
||||
print(('[^5es_extended^0] [^2INFO^0] Player ^5"%s" ^0has connected to the server. ID: ^5%s^7'):format(xPlayer.getName(), playerId))
|
||||
print(('[^2INFO^0] Player ^5"%s" ^0has connected to the server. ID: ^5%s^7'):format(xPlayer.getName(), playerId))
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -568,7 +568,7 @@ Citizen.CreateThread(
|
||||
)
|
||||
end
|
||||
else
|
||||
print('[^5es_extended^0] [^1ERROR^0] Es-Extended unable to check version!')
|
||||
print('[^1ERROR^0] Es-Extended unable to check version!')
|
||||
end
|
||||
end,
|
||||
'GET'
|
||||
|
||||
Reference in New Issue
Block a user