CREATE_OBJECT_NO_OFFSET
Creates an object (prop) with the specified model centered at the specified position. This object will initially be owned by the creating script as a mission entity, and the model should be loaded already (e.g. using REQUEST_MODEL). **This is the server-side RPC native equivalent of the client native [CREATE_OBJECT_NO_OFFSET](?\_0x9A294B2138ABB884).**
CFX
Signature
lua
CreateObjectNoOffset(GetHashKey("..."), 0.0, 0.0, 0.0, true, true, true)
-- returns EntityParameters
| Name | Type | Description |
|---|---|---|
| Hash | The model to spawn. | |
| float | Spawn coordinate X component. | |
| float | Spawn coordinate Y component. | |
| float | Spawn coordinate Z component. | |
| BOOL | Whether to create a network object for the object. If false, the object exists only locally. | |
| BOOL | Whether to register the object as pinned to the script host in the R\* network model. | |
| BOOL | False to create a door archetype (archetype flag bit 26 set) as a door. Required to be set to true to create door models in network mode. |
Usage
lua
CreateObjectNoOffset(GetHashKey("..."), 0.0, 0.0, 0.0, true, true, true)Generated from the native name, hash, and parameter list. Add a real example.
Details
- Hash
- API set
- Source
- cfx
Source: cfx
