server/common.lua
๐ซ๐ท Ici, vous allez ajouter les jobs2 et les charger dans votre serveur.
๐บ๐ธ Here, you will add the jobs2 and load them into your server.
๐ซ๐ท Au dรฉbut de votre fichier, vous avez ceci:
๐บ๐ธ At the beginning of your file, you have this:
ESX.Players = {}
ESX.Jobs = {}
ESX.Items = {}
๐ซ๐ท En dessous de
ESX.Jobs
, ajoutez ceci:๐บ๐ธ Below
ESX.Jobs
, add this:
ESX.Jobs2 = {}
๐ซ๐ท Cherchez la fonction
MySQL.ready(function()
๐บ๐ธ Find the function
MySQL.ready(function()
๐ซ๐ท Puis, remplacez la fonction entiรจre par celle-ci:
๐บ๐ธ Then, replace the entire function with this one:
MySQL.ready(function()
Core.DatabaseConnected = true
if not Config.CustomInventory then
local items = MySQL.query.await("SELECT * FROM items")
for _, v in ipairs(items) do
ESX.Items[v.name] = { label = v.label, weight = v.weight, rare = v.rare, canRemove = v.can_remove }
end
end
ESX.RefreshJobs()
ESX.RefreshJobs2()
print(("[^2INFO^7] ESX ^5Legacy %s^0 initialized! ^7(^2Version job2 by FW Scripts^7)^0"):format(GetResourceMetadata(GetCurrentResourceName(), "version", 0)))
StartDBSync()
if Config.EnablePaycheck then
StartPayCheck()
end
end)
Last updated