NextScripts
  • NextScripts Documentation
  • ESX Scripts
    • ✅Garage System
      • Installation
      • SQL
      • Configuration
        • Main Config
        • Blips Config
        • Commands Config
        • Zones Config
      • Events & Exports
        • Client
          • Deformation
          • getExtraData - Export
          • SpawnVehicle - Export
          • StoreVehicle - Export
          • isInAnyMarker - Export
          • impound - Export
          • pdimpound - Export
        • Server
          • Deformation
      • Commands
    • 🛠️Engine System
      • Installation
      • Configuration
      • Events & Exports
        • Client
        • Server
    • 🛠️Vehicle Lock
Powered by GitBook
On this page
  • Parameters Needed
  • Example Usage
  1. ESX Scripts
  2. Garage System
  3. Events & Exports
  4. Client

SpawnVehicle - Export

Parameters Needed

Argument
Data Type
Explanation

vehicleData

Array (GetVehicleProperties)

Vehicle Data

spawnCoords

vector3

the position where the vehicle need to spawn

spawnHeading

number

the rotation of the vehicle

extraData

Set the ExtraData to the Vehicle like (EVC, Livery, or set Custom Values, Like Vehicle Keys) all extraDatas will set as stateBag

callback

function

Here you can define your callback.

Example Usage

local propData = {
    vehicleData =  {} -- vehicleProperties predefined like for Jobs
    plate = "12345678" -- Current Plate of the Vehicle
}

local extraData = {
    evc = "jugular:test", -- EVC is supportet with that you can make custom emergency vehicles
}

exports["ns_garagesystem"]:SpawnVehicle(propData, coords, heading, extraData, function(vehicle)
    -- Your Code
end)
PreviousgetExtraData - ExportNextStoreVehicle - Export

Last updated 1 year ago

Array (ExtraData) ->

✅
getExtraData - Export