RedM Index logoRedM Index
NativesHashesClothesBlipsPropsItem Tool
Sign inGet started

Reference

  • Natives
  • Hashes
  • Clothes
  • Blips
  • Props

Namespace

  1. Reference
  2. Natives
  3. CREATE_VEHICLE_SERVER_SETTER

CREATE_VEHICLE_SERVER_SETTER

Equivalent to CREATE_VEHICLE, but it uses 'server setter' logic (like the former CREATE_AUTOMOBILE) as a workaround for reliability concerns regarding entity creation RPC. Unlike CREATE_AUTOMOBILE, this supports other vehicle types as well.

CFX

Signature

lua
CreateVehicleServerSetter(GetHashKey("..."), type, 0.0, 0.0, 0.0, 0.0)
-- returns Vehicle

Parameters

NameTypeDescription
HashThe model of vehicle to spawn.
char*The appropriate vehicle type for the model info. Can be one of `automobile`, `bike`, `boat`, `heli`, `plane`, `submarine`, `trailer`, and (potentially), `train`. This should be the same type as the `type` field in `vehicles.meta`.
floatSpawn coordinate X component.
floatSpawn coordinate Y component.
floatSpawn coordinate Z component.
floatHeading to face towards, in degrees.

Usage

lua
CreateVehicleServerSetter(GetHashKey("..."), type, 0.0, 0.0, 0.0, 0.0)

Details

Hash
API set
Source
cfx

Source: cfx

On this page

  • Signature
  • Parameters
  • Usage
  • Details