Object::createObject: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(add returns value)
 
(2 intermediate revisions by 2 users not shown)
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<br><br>----------<br><br>prop_tt_screenstatic (0xE2E039BC) is handled different. Not sure how yet but it I know it is.<br>thx fr Xenus.oida
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">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>
=== Required Arguments ===
=== Required Arguments ===
*'''modelHash:''' Model hash or name
*'''modelHash:''' Model hash or name
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">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Object_function_c}}
{{Object_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

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