CREATE_VEHICLE
Creates a vehicle with the specified model at the specified position. This vehicle will initially be owned by the creating script as a mission entity, and the model should be loaded already (e.g. using REQUEST_MODEL). ``` NativeDB Added Parameter 8: BOOL p7 ``` **This is the server-side RPC native equivalent of the client native [CREATE_VEHICLE](?\_0xAF35D0D2583051B0).**
CFX
Signature
lua
CreateVehicle(GetHashKey("..."), 0.0, 0.0, 0.0, 0.0, true, true)
-- returns EntityParameters
| Name | Type | Description |
|---|---|---|
| Hash | The model of vehicle to spawn. | |
| float | Spawn coordinate X component. | |
| float | Spawn coordinate Y component. | |
| float | Spawn coordinate Z component. | |
| float | Heading to face towards, in degrees. | |
| BOOL | Whether to create a network object for the vehicle. If false, the vehicle exists only locally. | |
| BOOL | Whether to register the vehicle as pinned to the script host in the R\* network model. |
Usage
lua
CreateVehicle(GetHashKey("..."), 0.0, 0.0, 0.0, 0.0, true, true)Generated from the native name, hash, and parameter list. Add a real example.
Details
- Hash
- API set
- Source
- cfx
Source: cfx
