Vehicle::getNumberPlateText: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Returns the license plate text from a vehicle. 8 chars maximum.
{{ClientsideJsFunction}}
==Syntax==
{{JSContainer|
<syntaxhighlight lang="javascript">vehicle.getNumberPlateText();</syntaxhighlight>
 
=== Required Arguments ===
The `getNumberPlateText` function retrieves the current text displayed on a vehicle's license plate. The text can contain a maximum of 8 characters, making it useful for identifying vehicles in roleplay scenarios or gameplay. This function can be helpful for both visual identification and gameplay mechanics related to vehicles.
===Return value===
 
*'''String'''
=== Required Params ===
==Example==
* None
 
=== Return Value ===
* '''String''' – The license plate text of the vehicle.
 
== Syntax ==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
vehicle.getNumberPlateText();
</syntaxhighlight>
</syntaxhighlight>
==See also==
 
== Example ==
<syntaxhighlight lang="javascript">
// Example usage of getNumberPlateText
 
let vehicle = mp.players.local.vehicle; // Get the local player's vehicle
mp.gui.chat.push("Number Plate: " + vehicle.getNumberPlateText()); // Output the license plate text to chat
</syntaxhighlight>
}}
== See Also ==
{{Vehicle_function_c}}
{{Vehicle_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 09:44, 2 November 2024

Client-Side
Function

 JavaScript



JavaScript Syntax


The `getNumberPlateText` function retrieves the current text displayed on a vehicle's license plate. The text can contain a maximum of 8 characters, making it useful for identifying vehicles in roleplay scenarios or gameplay. This function can be helpful for both visual identification and gameplay mechanics related to vehicles.

Required Params

  • None

Return Value

  • String – The license plate text of the vehicle.

Syntax

vehicle.getNumberPlateText();

Example

// Example usage of getNumberPlateText

let vehicle = mp.players.local.vehicle; // Get the local player's vehicle
mp.gui.chat.push("Number Plate: " + vehicle.getNumberPlateText()); // Output the license plate text to chat


See Also