- ESX Legacy (https://documentation.esx-framework.org/legacy/installation/).
- OXMySQL (https://overextended.dev/oxmysql#installation).
- Download this repository: https://github.com/lalBi94/ZODWorks/archive/refs/heads/master.zip.
- Add this line to your
resources.cfgfile. (You can also start your core).
ensure ZODWorks
- Import the ZODWorks object on your
fxmanifest.luascript with these lines.
shared_scripts { "@ZODWorks/shared/ZODWorks.lua" }
- Now store the tool in a variable.
local ZODWorks = exports["ZODWorks"]:getSharedObject()
- You can now use all available functions. Exemple :
local myMoney = ZODWorks.Player:getMoneyFrom("bank") local currencyConvert = ZODWorks.Utils:formatCurrency(tostring(myMoney)) print(myMoney) -- 75900 print(currencyConvert) -- 75 900$
You can add your own functions or triggers by placing them in ZODWorks/shared/AddOns/. Ideally, :
ZODWorks/shared/AddOns/<YOUR_SCRIPT>/locales/locales.lua(to add some langages)ZODWorks/shared/AddOns/<YOUR_SCRIPT>/server-side.luaZODWorks/shared/AddOns/<YOUR_SCRIPT>/client-side.lua
Exemple :
ZODWorks/shared/AddOns/myCustomScript/myCustomScript.lua
ZODWorks = ZODWorks or {} -- To supress the error "Attempt to call a nil value" ZODWorks.myCustomScript = {} ---@param str1 string The first string. ---@param str2 string The second string. ---@return string function ZODWorks.myCustomScript:stringFusion(str1, str2) return ("%s %s"):format(str1, str2) end setmetatable(ZODWorks, {__index = ZODWorks.myCustomScript})
[myCore]/myCustomScript/client.lua
local fusionString = ZODWorks.myCustomScript:stringFusion("Onde", "Folie") print(fusionString) -- Onde Folie
Owner → General Zod (bilaaaaaaaaaal)
Discord → https://discord.gg/xpCc6XmUaX
Version → BETA