Installation
Install Eleven Surfing on FiveM: OneSync, the surfboard item for ox_inventory, QBCore or ESX, server.cfg order, a first test in the water, standalone, updates.
Requirements
| Resource | Used for |
|---|---|
ox_lib | Notifications, the shop's buy dialog and translations |
| OneSync | Everyone sees the board and the surfer |
| Qbox, QBCore or ESX (optional) | The surfboard item and the shop's money. It also runs without a framework, using a command |
ox_inventory (optional) | The surfboard item. Without it, your framework's inventory is used |
ox_target or qb-target (optional) | Talking to the shop vendor. Without either, a "press E" prompt shows up |
Warning
Version 1.0.0 comes from our own Qbox surfing script, but the QBCore, ESX and standalone bridges are new and the package hasn't been tested in game on those frameworks yet. If something doesn't work, open a ticket and we'll fix it.
Enable OneSync
OneSync is required (the board is a networked entity and the swell is shared with GlobalState). With txAdmin, turn it on in its settings (Settings → FXServer, OneSync option). Without txAdmin, add this at the top of server.cfg:
set onesync on
After purchase, the resource shows up in your Cfx.re Keymaster account as eleven-surfing.
Tip
First time with an escrowed script? The general guide Install with Keymaster walks you through the download, your server license key and escrow step by step.
Step-by-step install
1. Copy the resource
Download eleven-surfing from Keymaster and copy the folder into resources. Don't rename it (if you do, read the note in step 2).
2. Add the surfboard item
The files are in the package's install/ folder. Use only the one for your inventory.
ox_inventory (Qbox too). Paste install/ox_inventory.lua inside the table in ox_inventory/data/items.lua:
['surfboard'] = {
label = 'Surfboard',
weight = 4000,
stack = false,
close = true,
description = 'Use it in the water to take the board out, then climb on with E.',
client = { export = 'eleven-surfing.useSurfboard' },
},
QBCore. Paste install/qb-core.lua inside QBShared.Items in qb-core/shared/items.lua:
surfboard = { name = 'surfboard', label = 'Surfboard', weight = 4000, type = 'item', image = 'surfboard.png', unique = true, useable = true, shouldClose = true, description = 'Use it in the water to take the board out, then climb on with E.' },
ESX. Run install/esx.sql once on your database:
INSERT IGNORE INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('surfboard', 'Surfboard', 4, 0, 1);
With QBCore and ESX the resource makes the item usable by itself; nothing else to do. You can translate label and description as you like.
Important
In ox_inventory, the export line uses the folder name. If you rename the folder, change eleven-surfing. to the new name.
3. Give the item an image
The package doesn't include an item image. Use any picture you like, named surfboard.png, in your inventory's image folder:
| Inventory | Folder |
|---|---|
| ox_inventory (also Qbox) | ox_inventory/web/images/ |
| qb-inventory (QBCore) | qb-inventory/html/images/ |
| ESX | Depends on your inventory: your inventory UI's image folder. The basic ESX menu shows no images |
4. Add it to server.cfg
After ox_lib, your framework, your inventory and your target (also in install/server.cfg):
ensure ox_lib
ensure qbx_core # your framework (or qb-core / es_extended). No framework: remove it
ensure ox_inventory # or your framework's inventory
ensure ox_target # or qb-target. Optional
ensure eleven-surfing
add_ace group.admin command.waves allow
Important
Order matters. On start, eleven-surfing checks which resources are already running to pick the shop's target (ox_target, qb-target or the "press E" prompt) and the item's label. If they start later, the shop may fall back to the text prompt even though you have a target.
The add_ace line lets admins use the /waves command. If only some players should surf (VIPs, for example), see Config.RequiredAce in Configuration.
5. Set up the config
Open config.lua and pick at least the language, the framework and the notifications:
Config.Locale = 'en' -- 'en' or 'es'
Config.Framework = 'auto' -- 'auto', 'qbox', 'qbcore', 'esx' or 'none'
Config.Notify = 'ox' -- 'ox', 'qbcore', 'esx' or 'native'
Every other option is in Configuration.
6. Restart the whole server
Warning
Don't restart this resource while players are connected. It loads a custom model and animations (stream/). Restarting it live (restart/ensure, txAdmin, or copying files over stream/ while the server is running) can crash players' games or leave them stuck loading. Apply the install, config changes and updates with a full server restart.
7. Test it
- Give yourself the board with your inventory's admin command. In ox_inventory it's
/giveitem <player id> surfboard 1; QBCore and ESX have a similar/giveitem, but the syntax may change between versions. - Go into the water at Vespucci Beach, standing at the shoreline or swimming. The board spawns in front of you (about 2 m), so face the sea.
- Use the
surfboarditem. The board appears floating with the messageBoard ready. Press E next to it to climb on. - Press E to climb on. Paddle with W (with Shift to go hard) until you pick up speed.
- Press Space to stand up. If you see
You need more speed to stand up, paddle a bit more. - To force big waves and feel the push, type
/waves 3.0(needs theadd_aceline from step 4)./waveswith no number follows the weather again. - Hold E to get off and put the board away.
- With a framework, look for the vendor: it's on the map with an icon at Vespucci Beach and sells the board for $150.
Every control and message is in In-game usage.
Standalone (no framework or inventory)
If your server doesn't use Qbox, QBCore or ESX, there's no item to hand out. Set this in config.lua:
Config.Item = false
Config.Command = 'surf'
Players take the board out and put it away by typing /surf in chat (with water in front of them). The shop turns itself off, since there's no money to charge.
Note
If you leave Config.Item set and the server finds no inventory, the console warns: No inventory found. Standalone servers: set Config.Item = false and Config.Command = 'surf'.
Don't install it next to another copy
Don't run eleven-surfing on the same server as another copy or older version of this surf script that uses the same board model and animations. Loading the same model twice gives a Duplicate Archetype error in the console and the board can break. Keep only one.
Keymaster entitlement error
If the console shows something like You lack the required entitlement to use eleven-surfing on startup, the server isn't allowed to run the encrypted resource:
- The server's license key (
sv_licenseKey) must belong to the same Cfx.re account you bought the script with. - Download the resource from Keymaster with that account; don't copy it from another server.
- After changing the key, restart the whole server.
Every case is covered in the general guide Install with Keymaster.
Still failing? Open a ticket on our Discord.
Updating
- Download the new version from Keymaster.
- Back up your
config.luaand your translations (locales/). - Stop the server, replace the
eleven-surfingfolder and put your config and translations back. If the new version adds options toconfig.lua, copy them into yours. - Start the server. Never update with the server running: it ships
stream/.