Page cover

Configuring Vehicle

This page will outline and explain how to create a configuration module and how to configure the vehicle for its setup.

Creating a configuration module

1

Please navigate to the vehicles folder within the resource, which can be found at the following path. settings > vehicles

2

Create a new file

Now that you are in the appropriate location, please proceed to create your module file. This can be accomplished by copying and pasting the provided example file.

3

Renaming your file

Now you have a new vehicle file, Please ensure the name of the file is the spawn code of the vehicle.

4

Vehicle Configuration

You now have a new work vehicle! Within the file you create, there are configurable variables and values that are unique to the vehicle. The details regarding this content are explained later on this page.


Vehicle config files define ladder storage and placement data for individual vehicle models. These files tell the ladder system:

  • What types of ladders the vehicle can carry

  • How many of each it supports

  • Where on the vehicle the ladders are placed or collected from


Structure Overview

return {
    ["<ladderType>"] = {
        offset = vector3(x, y, z),
        amount = <integer>,
    },
}

Fields

Field
Type
Description

"<ladderType>"

string

A string representing the ladder type ID, like "9" or "105"

offset

vector3

Position offset where the ladder(s) are located relative to the vehicle.

amount

integer

Number of ladders of that type stored on the vehicle.


Example 1: Single Ladder Type

return {
    ["9"] = {
        offset = vector3(0.94, -3.54, 1.16),
        amount = 1,
    },
}
  • The vehicle supports 1 ladder of type "9".

  • The ladder interaction is placed at an offset relative to the vehicle model:

    • X: 0.94 units to the right

    • Y: -3.54 units behind

    • Z: 1.16 units above the origin point


Example 2: Multiple Ladder Types

return {
    ["9"] = {
        offset = vector3(0.91, -4.54, 2.45),
        amount = 2,
    },
    ["105"] = {
        offset = vector3(0.02, -4.51, 2.39),
        amount = 2,
    }
}
  • The vehicle supports:

    • 2 ladders of type "9"

    • 2 ladders of type "105"

  • Each ladder type has its own distinct placement offset.

  • Useful for larger vehicles (e.g., fire trucks or ladder engines) that carry different sizes or multiple ladders.


Last updated