Vehicle::getNumberPlateText

From RAGE Multiplayer Wiki
Revision as of 09:44, 2 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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