Vehicle::getDisplayNameFromVehicleModel: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
Line 1: Line 1:
Returns model name of vehicle in all caps. Needs to be displayed through localizing text natives to get proper display name.<br>-----------------------------------------------------------------------------------------------------------------------------------------<br>While often the case, this does not simply return the model name of the vehicle (which could be hashed to return the model hash). Variations of the same vehicle may also use the same display name.<br>-----------------------------------------------------------------------------------------------------------------------------------------<br><br>Returns 'CARNOTFOUND' if the hash doesn't match a vehicle hash.<br><br>Using UI::_GET_LABEL_TEXT, you can get the localized name.<br><br>For a full list, see here: pastebin.com/wvpyS4kS (pastebin.com/dA3TbkZw)<br><br>
Returns model name of vehicle in all caps. Needs to be displayed through localizing text natives to get proper display name.<br>-----------------------------------------------------------------------------------------------------------------------------------------<br>While often the case, this does not simply return the model name of the vehicle (which could be hashed to return the model hash). Variations of the same vehicle may also use the same display name.<br>-----------------------------------------------------------------------------------------------------------------------------------------<br><br>Returns 'CARNOTFOUND' if the hash doesn't match a vehicle hash.<br><br>Using UI::_GET_LABEL_TEXT, you can get the localized name.<br><br>For a full list, see here: pastebin.com/wvpyS4kS (pastebin.com/dA3TbkZw)<br><br>
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">vehicle.getDisplayNameFromVehicleModel(modelHash);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.vehicle.getDisplayNameFromVehicleModel(modelHash);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''modelHash:''' Model hash or name
*'''modelHash:''' Model hash or name
Line 8: Line 8:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 21:35, 6 May 2017

Returns model name of vehicle in all caps. Needs to be displayed through localizing text natives to get proper display name.
-----------------------------------------------------------------------------------------------------------------------------------------
While often the case, this does not simply return the model name of the vehicle (which could be hashed to return the model hash). Variations of the same vehicle may also use the same display name.
-----------------------------------------------------------------------------------------------------------------------------------------

Returns 'CARNOTFOUND' if the hash doesn't match a vehicle hash.

Using UI::_GET_LABEL_TEXT, you can get the localized name.

For a full list, see here: pastebin.com/wvpyS4kS (pastebin.com/dA3TbkZw)

Syntax

mp.game.vehicle.getDisplayNameFromVehicleModel(modelHash);

Required Arguments

  • modelHash: Model hash or name

Return value

  • String

Example

// todo

See also