Skip to main content

Object::createObject

p5 - last parameter does not mean object handle is returned maybe a quick view in disassembly will tell us what is actually does

This returns a script handle (fwScriptGuid index) for the object, or 0 if the object failed to be created. (NOT IS A OBJECT HANDLE)

Syntax

```js mp.game.object.createObject(modelHash, x, y, z, networkHandle, createHandle, dynamic); ```

Required Arguments

  • modelHash: Model hash or name
  • x: float
  • y: float
  • z: float
  • networkHandle: Boolean
  • createHandle: Boolean
  • dynamic: Boolean

Return value

  • Script handle

Example

```js // todo ```

See also