--  LUA  SetDefaultVehicleNumberPlateTextPattern

0x79780FD2

-- SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN
SetDefaultVehicleNumberPlateTextPattern(
	plateIndex --[[ integer ]], 
	pattern --[[ string ]]
)

Parameters:

    plateIndex:

    A plate index, or -1 to set a default for any indices that do not have a specific value.
    pattern:

    A number plate pattern string, or a null value to reset to default.

Sets the default number plate text pattern for vehicles seen on the local client with the specified plate index as their default index (plateProbabilities from carvariations).

For consistency, this should be used with the same value on all clients, since vehicles without custom text will use a seeded random number generator with this pattern to determine the default plate text.

The default value is 11AAA111, and using this or a NULL string will revert to the default game RNG.
Pattern string format

    1
    will lead to a random number from 0-9.
    A
    will lead to a random letter from A-Z.
    .
    will lead to a random letter or number, with 50% probability of being either.
    ^1
    will lead to a literal
    1
    being emitted.
    ^A
    will lead to a literal
    A
    being emitted.
    Any other character will lead to said character being emitted.
    A string shorter than 8 characters will be padded on the right.

Examples:

    Lua

SetDefaultVehicleNumberPlateTextPattern(-1, ' AAA111 ')

SetDefaultVehicleNumberPlateTextPattern(4 , ' AAAAAA ')



-- fixed characters: plate will be FAYUM69C for example

SetDefaultVehicleNumberPlateTextPattern(-1, 'F^AYUM11A')
 
 

Parameters:

header:

sentence.

header:

sentence.

header:

sentence.

Returns:

sentence.

Summary

sentence.

Example

---  
    


Additional natives used in this example, or natives commonly used with this native.

NATIVE, NATIVE

Common Errors or Problems

Problem: sentence.

Problem: sentence.

Problem: sentence.

Credits and Disclaimers

The base of this data was taken from the redm/cfx fivem/rdr docs, and vespura. We have been saving and making notes for two years now, and are now adding them to our site for everyone to use. We will be modifying the notes as needed, and building tutorials around the data so these pages will change as we work on it. This is a manual process, not an automated one, so updates will occur as we have time, the priority is releasing resources. Thanks for your patience.

Was the documentation useful?

Related Examples and Posts