Installation
On this page
SAF TV needs no database. It finds your framework and inventory on its own.
Steps
- Put the
saf-tvfolder in yourresourcesfolder. - Add it to
server.cfg, after your framework and inventory:server.cfgensure saf-tv - Give your staff access. Staff can pick up anyone's TV and have no TV limit:server.cfg
add_ace group.admin tv.staff allow - Add the four TV items for your inventory. See Items.
- Copy the item pictures from
install/images/into your inventory's image folder (for ox_inventory:ox_inventory/web/images/). - Start the server. The console prints the framework and inventory it found, and the link the TV page is hosted at.
Items
| Item | Label | Model |
|---|---|---|
tv_small | Small TV | prop_tv_flat_03 |
tv_medium | TV | prop_tv_flat_02 |
tv_large | Big Screen TV | prop_tv_flat_01 |
tv_wall | Wall TV | prop_tv_flat_michael |
Pick the file in install/ that matches your inventory:
| File | For |
|---|---|
install/ox_inventory.txt | ox_inventory (Qbox, ND Core, ox_core). Paste into ox_inventory/data/items.lua |
install/qb_items.txt | QBCore inventories and qs-inventory. Paste into the shared items list |
install/esx_items.sql | ESX. Run once on your database |
With no inventory (Config.Inventory = 'none'), staff place TVs with /placetv <item> instead.
The TV page
YouTube only plays on https pages, so the TVs can't load their home screen straight from the resource. With
Config.ScreenUrl = 'auto' (the default) SAF TV hosts the page itself over https through your server's own
cfx.re address. There is nothing to set up.
That address only exists when your server is listed with Cfx.re. It is not there on sv_lan servers. Until it
shows up the TVs still work, but YouTube videos won't play.
To host the page yourself, upload the html/os folder to your website or CDN and point the config at it:
Config.ScreenUrl = 'https://cdn.example.com/tv/os/index.html'Optional: target
With ox_target or qb-target running, placed TVs get a "Pick up TV" option. Without one, players use
/pickuptv next to the TV.
Updating
Replace every file except your custom/ folder and the saved files placed.json (placed TVs) and fits.json
(picture alignment). Keep config changes in custom/shared/ so updates never undo them. See
Custom servers.