Gameplay::getModelDimensions: Difference between revisions
(yay) |
(yay) |
||
| 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()), &v_1A, &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.<br><br>Example from the scripts: GAMEPLAY::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()), &v_1A, &v_17); | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">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 | ||
| Line 10: | Line 10: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
todo | // todo | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
{{ | {{Gameplay_s_function_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
[[Category:TODO: Example]] | [[Category:TODO: Example]] | ||
Revision as of 21:06, 6 May 2017
Gets the dimensions of a model.
Calculate (maximum - minimum) to get the size, in which case, Y will be how long the model is.
Example from the scripts: GAMEPLAY::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()), &v_1A, &v_17);
Syntax
mp.game.gameplay.getModelDimensions(modelHash, minimum, maximum);
Required Arguments
- modelHash: Model hash or name
- minimum: Vector3
- maximum: Vector3
Return value
- object: minimum, maximum
Example
// todo