SetVehicleNumberPlate
From SA-MP Wiki
(Difference between revisions)
Revision as of 17:37, 1 January 2018 IstuntmanI (Talk | contribs) (Boxburg note) ← Previous diff |
Current revision RoboN1X (Talk | contribs) (mistyped vehicle id) |
||
Line 17: | Line 17: | ||
* There's a limit of 32 characters on each number plate (including embedded colors). | * There's a limit of 32 characters on each number plate (including embedded colors). | ||
* The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split. | * The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split. | ||
- | * Some vehicle models has a backward number plate, e.g. Boxville (489) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate). | + | * Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate). |
* This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). | * This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). | ||
}} | }} |
Current revision
Description:
Set a vehicle numberplate.
(vehicleid, numberplate[])
vehicleid | The ID of the vehicle to set the number plate of. |
numberplate | The text that should be displayed on the number plate. |
Return Values:
- 1: The function executed successfully.
- 0: The function failed to execute. The vehicle does not exist
Tip | You can use color embedding on the number plate text. |
Notes |
|
Example Usage:
new vehicleid = CreateVehicle(542, 2074.73, 1089.89, 10.51, 0.0, -1, -1, -1); SetVehicleNumberPlate(vehicleid, "ABCD 123");
[edit]
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetVehicleToRespawn: Respawn a vehicle.
- ChangeVehicleColor: Set the color of a vehicle.
- ChangeVehiclePaintjob: Change the paintjob on a vehicle.