Getting Started
Install Evolent Devices, free and open source laptops, computers, terminals and tablets for FiveM.
Devices pages
Evolent Devices puts laptops, computers, terminals and tablets into your city for Qbox, QBCore and ESX, with an admin panel (/evdevices) and an app API other scripts use to put their own app into the Evolent OS.
- Admins place devices with a free camera, and decide per device who may use it, who may move it and which apps it shows.
- Players buy devices as inventory items (ox_inventory, qb-inventory or the ESX inventory), put them on a table, lock them with a password and pick them up again. See Player Items.
- Laptops and computers run the Evolent OS: a window per app, a taskbar, a launcher and notifications. The tablet opens the same apps full screen in the player's hands. A terminal shows one app full screen.
- Each device has a Store: players install and remove the apps the server allows on it.
- Notifications reach a player everywhere: in the OS, as a card in the game, by the tablet in the pocket and as a count on the screens of their own laptops and computers.
- People nearby see the screen of a device in use. Antennas set in the panel give laptops and tablets signal.
- Other scripts register apps. See Apps.
Requirements
Always: ox_lib, oxmysql and OneSync. Optional: ox_target (without it players get a key prompt). Then one framework: Config.framework = 'auto' finds it (qbx_core, then qb-core, then es_extended).
| Qbox | QBCore | ESX (Legacy 1.10 or later) | |
|---|---|---|---|
| Framework | qbx_core | qb-core | es_extended |
| Player items | ox_inventory | ox_inventory, or qb-inventory 2.x | ox_inventory, or the ESX inventory |
| Character id | citizenid | citizenid | identifier (with the multichar prefix, char1:...) |
| Job rules (job, grade, on duty) | Yes, also the extra jobs of Qbox | Yes, the one job | Yes, the one job; on duty when ESX has no duty |
| Gang rules | Yes | Yes | No: ESX has no gangs |
| Home rules (keys, homes only) | With qbx_properties | No | No |
| Admin check | Aces | Aces, then QBCore permissions | Aces, then ESX groups |
See Frameworks for what each bridge reads.
Installation
Download
Download the latest evolent_devices release and place it inside your resources folder. The server needs everything except web/ (apart from web/build), sdk/ and node_modules/.
The resource also streams the laptop, computer, terminal and tablet models and the tablet clips (stream/). No other resource may stream files with the same names.
Add the items
Add the laptop, computer and tablet items to your inventory. Player Items has the lines for ox_inventory, qb-inventory and the ESX inventory.
Database
There are no SQL files to run. The script creates its evdev_ tables on the first start (Config.database.autoMigrate). To create them yourself, import sql/install.sql and set autoMigrate = false.
Add the ACE permission
Give your staff the devices panel:
add_ace group.admin evolent_devices.admin allowOn QBCore the permissions god and admin, and on ESX the groups superadmin and admin, open it too (Config.adminGroups). ESX also puts every player into group.<their group>, so the line above works there as it is.
Optionally, give helpers a smaller level: list, place, move, edit and remove devices, but no settings, apps, item rules or giving items.
add_ace group.helper evolent_devices.manage allowStart the script
evolent_devices starts after ox_lib, oxmysql, the framework, the inventory and ox_target, and before every script that brings an app.
ensure ox_lib
ensure oxmysql
ensure [qbx]
ensure ox_inventory
ensure ox_target
ensure evolent_devicesDon't put evolent_devices into the dependencies of another resource: ensure evolent_devices would stop that resource and not start it again. Scripts that bring an app register again by themselves when evolent_devices starts.
Check the console
The models need a server restart with nobody on. Start the server; the console shows, without any SCRIPT ERROR:
[evolent_devices] Database tables created: evdev_devices, evdev_apps, ...
[evolent_devices] Framework: Qbox. Inventory: ox_inventory.
[evolent_devices] Ready. Devices: 0 (0 laptops, 0 computers, 0 terminals, 0 tablets), 0 removed. Apps known: 0.On QBCore and ESX the second line names that framework and its inventory. No framework is running means the framework starts after evolent_devices in server.cfg; No supported inventory is running means players get no device items until one runs.
Place your first device
Join the server, type /evdevices and press Place a device. See Using Devices.
Updating
The resource streams the models. A ytyp unloaded while one of its props stands, or while a tablet is in someone's hands, crashes clients. Restart evolent_devices with nobody on, or restart the whole server.
Run refresh first when fxmanifest.lua changed. Players get new web files only after the restart.
refresh
ensure evolent_devicesYour own wallpapers live in web/build/wallpapers/ and Config.wallpapers: carry them over when you copy a new release over the old folder. See Configuration.
To remove the script, stop the server, take the server.cfg lines and the folder away and start the server. The evdev_ tables can stay.