> For the complete documentation index, see [llms.txt](https://organized-chaos.gitbook.io/organized-chaos-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://organized-chaos.gitbook.io/organized-chaos-docs/skateboards/installation.md).

# Installation

Install Skateboard, put your first board under your feet, and open a skate shop.

{% stepper %}
{% step %}

### Add the resource

Put the `skateboard` folder into your `resources` folder. See Installation basics for the download and the licence key.
{% endstep %}

{% step %}

### Start it

Add it to your `server.cfg`, after your framework, oxmysql and ox\_target if you use them:

```cfg
ensure skateboard
```

{% endstep %}

{% step %}

### Add the items (optional)

For boards as inventory items with ESX, QBCore, Qbox or ox\_inventory, add the items to your framework's item list, the custom board's `skateboard_custom` too, and copy the item pictures from `install/images` into your inventory's image folder. See Items.
{% endstep %}

{% step %}

### Restart the server

Restart the whole server once after adding the resource, and reconnect: the boards' models and sounds load as a player connects. With oxmysql the script makes its two tables itself on the first start (`skateboard_custom` and `skateboard_custom_art`).
{% endstep %}

{% step %}

### Try it

As an admin, `/skateboard` puts a board under your feet with you standing on it; `/skateboard neon` a particular one. `/skateboardbuilder` opens the board builder: a custom board of your own, for nothing. Both are for admins by default:

```cfg
add_ace group.admin command.skateboard allow
```

The ready-made boards are ordinary vehicles, so any vehicle spawner works too, for example the `/car` command of your framework: `/car skateboard_hotrod`.
{% endstep %}

{% step %}

### Open a skate shop (optional)

Stand where the catalogue is to go, face the way its front is to face, and type `/skateshop place chaos kiosk`. Do the same for the bench (`bench`) and the deck wall (`rack`). See The skate shop.
{% endstep %}
{% endstepper %}

## Updating from 1.x

{% hint style="info" %}
2.0 adds new models, the shop's stations and a new item. Restart the server after the update and have everyone reconnect once.
{% endhint %}

* Add the `skateboard_custom` item (ESX: run `install/esx_items.sql` again, it only adds what is missing).
* Take the new `config.lua`, or copy its new tables into yours: `Config.Custom`, `Config.Builder`, `Config.Shop`, `Config.Poses`, and the new texts in `Config.Locale` (`Builder` and the ones after it).

## Spawn names

| Spawn name            | Name in game   |
| --------------------- | -------------- |
| `skateboard`          | Skateboard     |
| `skateboard_carbon`   | Carbon Pro     |
| `skateboard_neon`     | Neon           |
| `skateboard_volt`     | Volt E-Board   |
| `skateboard_twinfish` | Twin Fish      |
| `skateboard_lattice`  | Lattice        |
| `skateboard_hotrod`   | Hot Rod        |
| `skateboard_bamboo`   | Bamboo Cruiser |
| `skateboard_pixel`    | Pixel          |
| `skateboard_magma`    | Magma          |

Use the same names for an entry in your vehicle shop or garage script. The item of each board has the same name as its spawn name. Custom boards (`skateboard_custom`) are not spawned by name: they come from the builder and the item.

## Requirements

{% hint style="warning" %}
OneSync has to be enabled on the server. Without it, other players do not see the rider's poses and tricks.
{% endhint %}

No framework is needed. ESX, QBCore or Qbox are used for the items and the shop's money when they run, oxmysql to keep the custom boards, ox\_target for picking a board up, carrying it and the shop's stations. ESX, QBCore or ox\_lib can show the resource's messages, see `Config.Notify` on the Configuration page.

## What you can edit

The code ships encrypted. These files are left open:

| File                      | What it is for                                                                                                   |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `config.lua`              | Every setting and every text. See Configuration                                                                  |
| `server_framework.lua`    | Money, items, jobs and admins for ESX, QBCore, Qbox or no framework. Change it if your economy works differently |
| `client_exports.lua`      | The client exports. Add exports of your own here. See Exports                                                    |
| `server_exports.lua`      | The server exports                                                                                               |
| `install/esx_items.sql`   | The items for ESX's database. See Items                                                                          |
| `install/images/`         | A picture for every item, 256 x 256                                                                              |
| `data/carvariations.meta` | The colour sets a freshly spawned board picks from. See Boards and colours                                       |
| `data/handling.meta`      | The handling: steering lock, mass, suspension, centre of mass                                                    |
| `data/vehicles.meta`      | Camera and detail distances                                                                                      |
| `html/sounds/`            | The board's sounds, one `.ogg` file each. See Sounds                                                             |

Restart the resource after changing `config.lua` or a sound. After changing a file in `data/`, restart the server and have players reconnect.
