Gameplay::getModelDimensions: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
Line 1: Line 1:
Gets the dimensions of a model.<br><br>Calculate (maximum - minimum) to get the size, in which case, Y will be how long the model is.<br><br>Example from the scripts: GAMEPLAY::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()), &amp;v_1A, &amp;v_17);
Gets the dimensions of a model.<br><br>Calculate (maximum - minimum) to get the size, in which case, Y will be how long the model is.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.gameplay.getModelDimensions(modelHash, minimum, maximum);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.gameplay.getModelDimensions(modelHash, minimum, maximum);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''modelHash:''' Model hash or name
*'''modelHash:''' Model hash or name
*'''minimum:''' Vector3
*'''maximum:''' Vector3
===Return value===
===Return value===
*'''object:''' minimum, maximum
*'''object:''' min, max
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">

Revision as of 21:50, 22 March 2018

Gets the dimensions of a model.

Calculate (maximum - minimum) to get the size, in which case, Y will be how long the model is.

Syntax

mp.game.gameplay.getModelDimensions(modelHash, minimum, maximum);

Required Arguments

  • modelHash: Model hash or name

Return value

  • object: min, max

Example

// todo

See also

Template:Gameplay s function c