London Studios Documentation
Our StoreSupport PanelYouTube Channel
  • General
    • Documentation
    • Resource Support
    • Downloading Resources
    • Installing Resources
    • Resource Transfers
    • Common Errors
    • Translating Resources
    • Inventory Icons
    • Resource Ideas
    • Integration Requests
  • Vehicles
    • American Rearmount Ladder
      • Setting up
      • Anticheat Issues
    • Advanced Recovery Truck
      • Setting up
      • Anticheat Issues
    • SWAT Vehicle
      • Setting up
      • Anticheat Issues
    • Police Water Cannon
      • Setting up
      • Anticheat Issues
    • British Ladder Truck
      • Setting up
      • Anticheat Issues
    • Tiller Ladder Truck
      • Setting up
      • Anticheat Issues
    • Scissor Lift
      • Setting up
      • Anticheat Issues
    • Car Transporter
      • Setting up
      • Anticheat Issues
    • Water Carrier & Command Unit
      • Setting up
      • Anticheat Issues
    • Water Spray Unit
      • Setting up
      • Anticheat Issues
    • Snow Loader Pack
      • Setting up
      • Anticheat Issues
  • Resources
    • Bike Hire
      • Using the resource
      • Configuring the resource
      • Configuring locations
    • Bomb Disposal Robot (EOD)
      • EOD - How to use
      • EOD - Permissions Check
      • OX_Inventory Integration
      • Other Integrations
    • Car Sale Sign
      • Installation Video
      • Using the resource
      • Configuring the resource
      • Configuring permissions
      • Item Support
    • Congestion Charge
      • Configuring the resource
      • Modifying Zones & Adding Cameras
    • Custom Vinewood Sign
      • Installation Video
      • Sign Setup
    • Decontamination Tent
      • Using the resource
      • Configuring the resource
      • OX_Inventory Integration
      • Other Integrations
    • Directional Spikes
      • Using the resource
      • Configuring the resource
    • Emergency Call Points
      • Using the resource
      • Configuring the resource
    • Fire Supply Line [v2]
      • Using the resource
      • Configuring Fire Supply Line
    • Fire Tools [v2]
      • Using the resource
      • Configuration
      • Permissions, Notifications and Items
      • Item Support
    • Helicopter Rescue
      • Using the resource
      • Configuring the resource
      • Configuring the permissions
      • Configuring locations
    • Mobile Spike
      • Setting up vehicles
      • Misc Configuration Values
      • Permission Checks
      • OX_Inventory Integration
      • Other Integrations
    • Police Grappler
      • Setting up vehicles
      • Misc Configuration Values
      • Permissions, Notifications & Items
      • Item Support
    • Police Shields
      • Using the resource
      • Permissions, Notifications & Items
      • Item Support
    • Rope Rescue Tripod & Basket
      • Using the resource
      • Configuring the resource
      • OX_Inventory Integration
      • Other Integrations
    • Rescue Cushion
      • Using the resource
      • Permissions, Notifications & Items
      • Other Integrations
    • Smart Speed Signs
      • Configuring the resource
      • Adding new locations
    • Smart Airbags
      • Using this resource
      • Permissions & Notifications
    • Smart Bollards
      • Installation Video
      • Configuring the resource
      • Setting up a new set
    • Smart Clamp
      • Permissions, Notifications and Items
      • Item Support
      • Exports and Events
    • Smart Defib
      • Using the resource
      • Defib locations
      • Framework support
      • Setting up blips
      • Chance of success
      • Sound settings
      • Keybind configuration
      • Automatic reset
      • Custom Death Scripts
      • OX_Inventory Integration
      • Other Integrations
    • Smart Drone
      • Using the resource
      • Permission Checks, Notifications & Items
      • Keybinds
      • Item Support
      • Other Integrations
    • Smart Fires
      • Installation Video
      • Putting out fires
      • Fire Alerts
      • Remove Fires Automatically
      • Custom Notifications
      • Automatic Fires
        • Enabling automatic fires
        • Job / Permission Check
        • Adding locations
        • Automatic Fire Chances
        • Other automatic fire settings
      • Commands
      • Command permission checks
      • Editing fire types
      • Editing smoke types
      • Misc configuration values
      • Setting up weapons
      • Area of patrol settings
      • Clock on system
      • Lighter Item & Command
      • Server exports and events
      • Discord logging
      • Society Payments
    • Smart Hose [v2]
      • Using the resource
      • Configuring Smart Hose
    • Smart Matrix
      • Install & Configuration Video
      • OX_Inventory Integration
      • Other Integrations
    • Smart Motorways
      • Using the resource
      • Configuring the resource
    • Smart Signs
      • Configuring the resource
      • Configuring the permissions
    • Smart Speed Cameras
      • Configuring the resource
      • Adding new cameras
    • Smart Taser
      • Using the resource
      • Configuration
      • OX_Inventory Integration
      • Other Integrations
    • Smart Vehicle
      • Compatible Vehicles
      • Free Developer Copy
      • Permission Checks
      • Using a Smart Vehicle
      • Informations for Developers
      • Vehicle Control Menus
    • Police Tracker
      • Setting up vehicles
      • Resource Configuration & Usage
      • Item Support
    • Throw Bag
      • Resource Usage
      • OX_Inventory Integration
      • Other Integrations
    • Vehicle Rescue
      • Using the Resource
      • Permissions, Notifications & Items
      • Copy of Item Support
    • Water Monitor
      • Using the resource
      • Copy of Permissions, Notifications & Items
      • Copy of Item Support
    • Weapon Lanyard
      • Setting up weapons
      • Using the resource
      • Setting up clothing / EUP
Powered by GitBook
On this page
  • Controls
  • Spawning the vehicle in
  • Setting up a vehicle
  • Automatic Setups
  • Reset a vehicle
  • Controlling a smart vehicle
  • Controlling while driving
  • Multiple Ladders
  • Entering the cage
  • Moving the cage
  • Configuring the cage
  • Adding other vehicle files
  • Exports

Was this helpful?

  1. Resources
  2. Smart Vehicle

Using a Smart Vehicle

This guide will show you the simple process to use and setup a Smart Vehicle.

PreviousPermission ChecksNextInformations for Developers

Last updated 3 months ago

Was this helpful?

This guide will show you how to get setup using the vehicle. If you're at this point, you should have the resource installed already.

Controls

For a full list of controls, please see our documentation on the relevant vehicle. For the included British Ladder and Tiller Ladder truck, see the controls below:

Spawning the vehicle in

Once in-game, you'll need to spawn the vehicle in, such as firetruk (for our default British firetruck).

You may want to set this up in a VehicleSpawner or even using vMenu.

Once spawned in, it will look empty. This is because our resource hasn't setup the vehicle yet.

If your vehicle involves a trailer (such as our Tiller Ladder Truck), you may need to spawn in two vehicles.

Setting up a vehicle

You must be inside the vehicle to use the /setupvehicle command.

A vehicle can be setup using /setupvehicle, this will install all the necessary moveable parts in the correct position. The player that sets up the vehicle is the only one that can control it, so it is important to remember this. However, any player can enter the cage.

Automatic Setups

Smart Vehicle supports automatic setups for models without multiple variants/setup types, meaning this can work for vehicles such as our British Ladder Truck and Tiller Ladder Truck.

Automatic Setup works by immediately setting the vehicle up as soon as you enter the drivers seat and is enabled by default. If you wish to disable automatic setup, just head to the config.lua file.

To use automatic setups on vehicles with a trailer, you'll need to be in the cab/front vehicle to use it.

Reset a vehicle

You must be inside the vehicle to use the /resetvehicle command.

The vehicle can be reset at any time using the /resetvehicle command, allowing you to set it up again (which may be with a different option - if the Smart Vehicle has multiple setups such as our Snow Loader pack).

Controlling a smart vehicle

Once a smart vehicle is setup, you can approach the vehicle and an on-screen prompt will appear, advising you which key to press in order to start controlling.

Some third party smart vehicles will have this disabled, meaning they can only be controlled from the driver seat - such as construction vehicles.

Some vehicles also have the ability to start controlling whilst inside or near the cage, such as our British Firetruck. You'll see the "Press X to control" message whilst you are near/in the cage for these models.

Controlling while driving

Smart Vehicle allows vehicle developers to configure whether you are able to control the vehicle whilst driving. If this is enabled for your vehicle, you will be able to press the control key whilst driving and then use the same keybinds as normal to make the vehicle parts move.

Please note that once you begin controlling a vehicle whilst driving you will be unable to leave the vehicle until you stop controlling (by pressing the same keybind again).

Multiple Ladders

Some vehicles have been setup to support multiple setups, meaning you can select which setup/ladder is setup on a certain vehicle. For example, you might have a base fire truck with two types of setups or ladders.

Using the /setupvehicle [type] command you can select a setup. The type argument must match the name of a Smart Vehicle vehicle file, which can be found towards the top:

    name = "FireTruck",

If your vehicle does not support multiple setups, just use /setupvehicle and it should work fine!

Our Snow Loader pack (free) supports multiple setups. See our guide on this here:

Entering the cage

This command was created to secure a player within the cage. It is also possible to walk up a ladder (with the right model and collisions), however once moved, this command will ensure the player does not fall out.

Once setup, any player can enter enter the cage of the vehicle (if permissions are setup, this will be restricted). This will only work if the vehicle has a cage.

/entercage - This command allows you to enter the cage of a nearby vehicle.

/exitcage - This command allows you to exit the cage of the vehicle.

Once inside the cage, you are not able to move about and you are attached to the vehicle in a fixed position. You can still use tools such as our hose and spray water down towards a fire.

After exiting the cage, you will be teleported back to the side of the vehicle and detached from it, allowing you to continue roleplay.

Moving the cage

Whilst one player is controlling the vehicle (the one that set it up), another player is able to enter the cage and can be moved about, allowing live communication of a fire from another angle.

Configuring the cage

By default, you can only use the /entercage command when at the base of a Smart Vehicle. This can be changed in the config.lua file:

cageCommand = {
    commandName = "entercage",
    exit = "exitcage",
    enterCageSuggestion = "Enter a cage",
    exitCageSuggestion = "Exit a cage",
    enterCageDistance = 20.0, -- This is the distance you can be from the vehicle to enter the cage.
    enterCageCheck = { -- Enable this so that instead of checking distance from vehicle, it checks distance from cage.
        enabled = false,
        distance = 5.0,
        spawnAtCageOnExit = true,
    },
}

The enterCageDistance is the default value, meaning you must be 20.0 metres within the vehicle in order to use the command. Some servers prefer this check to be done based on the distance from the cage. For this, enable the enterCageCheck and then set the distance.

The spawnAtCageOnExit is also enabled by default, meaning you spawn inside the cage when you use the /exitcage command.

Adding other vehicle files

All vehicles purchased from a third-party should come with a unique file, such as firetruk.lua with all data relating to the moveable parts and the keybinds chosen to move them.

As well as streaming the vehicle files (such as YTD, YTF) in a separate resource, you should add this vehicle data file (.lua) directly to the Smart Vehicles > vehicles folder.

Drag and drop the vehicle data file provided into the vehicles folder within the Smart Vehicles resource.

Vehicle Issues

If you've purchased a vehicle from a third party that is compatible with Smart Vehicle and you are experiencing issues with the movements of the vehicle, it is best that you reach out to the third party developer as they will be best to assist you.

Developers

If you're still looking for the part where you learn how to setup vehicles, you're in the right place. Just keep scrolling and we'll get there shortly.

Exports

Setup Vehicle (Client Sided)

exports["SmartVehicle"]:SetupSmartVehicle(vehicle, id)

This export allows you to setup a vehicle. The id argument is the setup id (if the vehicle has multiple). This can be left blank otherwise.

Reset Vehicle (Client Sided)

exports["SmartVehicle"]:ResetSmartVehicle(vehicle)

This export allows you to reset a vehicle.

IsPedControllingVehicle (Client Sided)

exports["SmartVehicle"]:IsPedControllingVehicle()

This export allows you to find out if the current ped is controlling a Smart Vehicle, returning true or false.

IsPedInCage (Client Sided)

exports["SmartVehicle"]:IsPedInCage()

This export allows you to find out if the current ped is in a Smart Vehicle cage, returning true or false.

British Ladder Truck
Tiller Ladder Truck
Snow Loader Pack
Compatible Vehicles