Script::getNumberOfInstancesOfStreamedScript: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
Line 1: Line 1:
Gets the number of instances of the specified script is currently running.<br><br>Actually returns numInstances - 1.<br>if (scriptPtr)<br>    v3 = GetNumberOfInstancesOfScript(scriptPtr) - 1;<br>return v3;
Gets the number of instances of the specified script is currently running.<br><br>Actually returns numInstances - 1.<br>if (scriptPtr)<br>    v3 = GetNumberOfInstancesOfScript(scriptPtr) - 1;<br>return v3;
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">script.getNumberOfInstancesOfStreamedScript(scriptHash);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.script.getNumberOfInstancesOfStreamedScript(scriptHash);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''scriptHash:''' Model hash or name
*'''scriptHash:''' Model hash or name
Line 8: Line 8:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Script_function_c}}
{{Script_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 21:31, 6 May 2017

Gets the number of instances of the specified script is currently running.

Actually returns numInstances - 1.
if (scriptPtr)
v3 = GetNumberOfInstancesOfScript(scriptPtr) - 1;
return v3;

Syntax

mp.game.script.getNumberOfInstancesOfStreamedScript(scriptHash);

Required Arguments

  • scriptHash: Model hash or name

Return value

  • int

Example

// todo

See also

Template:Script s function c