Installation
Requirements
Section titled “Requirements”| Resource | Notes |
|---|---|
A framework: qb-core, qbx_core or es_extended |
Optional. Needed for job and gang conditions and for the creator’s money and items. Without one it runs standalone |
An inventory: ox_inventory, qs-inventory, qb-inventory or the ESX one |
Optional. Needed for item conditions, item pictures and the creator’s items |
No database, SQL file or additional items are required.
Step by step
Section titled “Step by step”1. Download the resource
Section titled “1. Download the resource”Open portal.cfx.re, go to Assets > Granted Assets and download SL-Interact. It has two folders: sl_interact (the script) and sl_interact_demo (an optional example).
The open-source edition is downloaded the same way, with every file open. It also includes the source code of the interface in sl_interact/web.
2. Add it to your resources
Section titled “2. Add it to your resources”Place the sl_interact folder in your resources directory, for example resources/[scripts]/sl_interact.
3. Remove your old target script
Section titled “3. Remove your old target script”If your server uses ox_target, qb-target or qtarget, remove it from server.cfg (or move its folder to a [disabled] folder). SL-Interact takes its place: the scripts that use it keep working without changes. See target scripts.
4. Start it in server.cfg
Section titled “4. Start it in server.cfg”Start SL-Interact after your framework and inventory, and before any script that uses it or used your old target script:
ensure qb-core # or qbx_core / es_extendedensure ox_inventory # your inventory, if anyensure sl_interact # before [qb], [standalone]... and every script that uses itensure [qb]On a default QBCore server, qb-target lives inside [qb]: move it out of that folder, and put ensure sl_interact above ensure [qb].
5. Give admins permission
Section titled “5. Give admins permission”The style editor (/slinteract_style) and the interactions panel (/slinteract_admin) need the sl_interact.style ACE permission:
add_ace group.admin sl_interact.style allowYou can also list identifiers (license:, discord:, fivem:) in Config.StyleEditor.admins in config.lua.
6. Check the configuration
Section titled “6. Check the configuration”Open config.lua and set at least:
Config.Locale:'en'or'es'.Config.Debug:falseon a live server.
Everything else works with its defaults. See configuration.
7. Restart the server
Section titled “7. Restart the server”Restart the whole server, not only the resource. Scripts that use your old target script need to start after SL-Interact to reach it.
Try it
Section titled “Try it”The download includes an example resource, sl_interact_demo, next to sl_interact and with open code:
- Put
sl_interact_demoin yourresourcesfolder and addensure sl_interact_demoafterensure sl_interact. - In game, type
/slidemo: an ATM, a door, a crate, a vending machine, a car and an NPC appear in front of you. - Hold Alt and aim at any vehicle to open its menu.
/slidemo clearremoves them.
Remove it from server.cfg when you are done.
Updating
Section titled “Updating”- Download the new version from portal.cfx.re.
- Keep your
config.luaand thedatafolder:data/style.json(your style),data/interactions.json(panel rules) anddata/creations.json(what you built in the creator). - Replace the rest of the folder and restart the server.
- Check the changelog for new options in
config.lua.