lalBi94 / ZODWorks

Five M Tools- RageUI - ESX Legacy

Home Page:https://discord.gg/xpCc6XmUaX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependencies

Installation

  1. Download this repository: https://github.com/lalBi94/ZODWorks/archive/refs/heads/master.zip.
  2. Add this line to your resources.cfg file. (You can also start your core).
ensure ZODWorks

Usage

  1. Import the ZODWorks object on your fxmanifest.lua script with these lines.
shared_scripts {
    "@ZODWorks/shared/ZODWorks.lua"
}
  1. Now store the tool in a variable.
local ZODWorks = exports["ZODWorks"]:getSharedObject()
  1. 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$

Add-Ons

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.lua
  • ZODWorks/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

Credit

Owner → General Zod (bilaaaaaaaaaal)
Discord → https://discord.gg/xpCc6XmUaX
Version → BETA

About

Five M Tools- RageUI - ESX Legacy

https://discord.gg/xpCc6XmUaX

License:GNU General Public License v3.0


Languages

Language:Lua 100.0%