Object::createObject: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
(add returns value)
 
Line 1: Line 1:
p5 - last parameter does not mean object handle is returned<br>maybe a quick view in disassembly will tell us what is actually does  
p5 - last parameter does not mean object handle is returned<br>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==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.object.createObject(modelHash, x, y, z, networkHandle, createHandle, dynamic);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.object.createObject(modelHash, x, y, z, networkHandle, createHandle, dynamic);</syntaxhighlight>
Line 11: Line 13:
*'''dynamic:''' Boolean
*'''dynamic:''' Boolean
===Return value===
===Return value===
*'''Object handle or object'''
*'''Script handle'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">

Latest revision as of 19:08, 7 June 2021

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

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

// todo

See also

  • [[Object::disableGlow|mp.game.object.disableGlow