Installation
NRG SimCard for LBphone
Required Scripts ⚙️
Before starting the installation process, ensure the following dependencies are installed:
esx/qbcore/qboxox_libox_inventorylb-phoneoxmysqlox_target
Installation Steps 🛠️
Move
NRGSimCustomto LB-Phone Script 📂In the
lb-phonescript, navigate toclient > custom.Move the
NRGSimCustomfolder directly tolb-phone > client > custom.
Check
Config.Item.Uniqueinlb-phone/config/config.lua🔧Open
lb-phone/config/config.lua.Locate the following line
Config.Item.UniqueandConfig.DatabaseChecker.AutoFixIf it is set to
true, change it tofalse:
Config.Item.Unique = false Config.DatabaseChecker.Enabled = false -- not necessary* Config.DatabaseChecker.AutoFix = false -- not necessary*Add items to
ox_inventoryScript 📝Open the
ox_inventory > data > items.luaAdd the following code for the new items:
["phone"] = { label = "Phone", -- Translate this label to your desired language weight = 190, stack = false, consume = 0, client = { export = "nrg_simcard.simPhoneOpen", add = function() TriggerEvent("nrg_simcard:itemAddedPhone") end }, buttons = { { label = 'SIM Cards', -- Translate this label action = function(slot) TriggerEvent('nrg_simcard:SimCards', slot) end }, { label = 'Turn On/Off', -- Translate this label action = function(slot) TriggerEvent('nrg_simcard:TurnPhoneON', slot) end }, } }, ["custom_number"] = { label = "BON - Custom number", -- Translate this label weight = 100, stack = true, description = "Receive a Custom number at the SIM shop", -- Translate description }, ["sim_card"] = { label = "SIM Card", -- Translate this label weight = 190, stack = false, consume = 0, client = { add = function() TriggerEvent("nrg_simcard:itemAddedSIM") end }, },Item Duplication Check: Before adding the above code, check if the item name already exists in the
ox_inventoryconfiguration. If they exist replace them.
Add Script to Resources 📁 After editing the
ox_inventory, you need to ensure that the script is properly added to your server.Place the
nrg_simcardfolder inside yourresourcesdirectory.In your
server.cfgorresources.cfgfile, add the following line to ensure the script is loaded:
ensure nrg_simcardDatabase Setup 🗄️ When you run the script for the first time, a new database called
nrg_simcardwill be automatically created in your MySQL database.⚠️ The script must be uploaded to a clean database with LB phone without any data ⚠️
*if you want to leave the option:
Go to lb-phone/server/misc/databaseChecker/databaseChecker.lua
Find and remove or comment:
This guide will ensure a smooth installation of the NRG SimCard script. Follow the steps carefully to avoid errors and conflicts. If you encounter any issues or need further assistance, feel free to reach out!
Last updated