Vehicle::getNumberPlateTextIndex

From RAGE Multiplayer Wiki
Revision as of 17:48, 28 May 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Returns the PlateType of a vehicle

0 - Blue on White1
1 - Yellow on Black
2 - Yellow on Blue
3 - Blue on White2
4 - Blue on White "SA EXEMPT"
5 - North Yankton
6 - eCola
7 - Las Venturas
8 - Liberty City
9 - LS Car Meet
10 - LS Panic
11 - LS Pounders
12 - Sprunk

Syntax

vehicle.getNumberPlateTextIndex();

Return value

  • number

Example

const vehicle = mp.vehicles.at(0); //find vehicle with 'id' 0
if (!vehicle || !mp.vehicles.exists(vehicle)) return;
const plateType = vehicle.getNumberPlateTextIndex();
mp.console.logInfo(`Vehicle ID ${vehicle.id} has plate type number ${plateType}`);


See also