VehicleClient

setVehicleNumberPlateText

SET_VEHICLE_NUMBER_PLATE_TEXT0x95A88F0B409CDA47

The GTA V native SET_VEHICLE_NUMBER_PLATE_TEXT of the VEHICLE namespace, as LS:MP client scripts call it: the global function setVehicleNumberPlateText, in JavaScript and in Lua.

SignatureJavaScript
setVehicleNumberPlateText(vehicle: Vehicle, plateText: string): void
SignatureLua
setVehicleNumberPlateText(vehicle: Vehicle, plateText: string)

Usage

JavaScript
setVehicleNumberPlateText(vehicle, plateText);
Lua
setVehicleNumberPlateText(vehicle, plateText)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
plateTextstringstringstring

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Sets a vehicle's license plate text. 8 chars maximum.

Example:

Ped playerPed = playerPedId();
Vehicle veh = getVehiclePedIsUsing(playerPed);
char *plateText = "KING";
setVehicleNumberPlateText(veh, plateText);

Reference

Namespace
Vehicle VEHICLE
In the game
void SET_VEHICLE_NUMBER_PLATE_TEXT(Vehicle vehicle, const char* plateText)
Hash
0x95A88F0B409CDA47

Open in the interactive natives reference