setPlateNumber: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)\]\]" to "{{GameCategory|arma3|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 11: | Line 10: | ||
|gr1= Object Manipulation |GROUP1= | |gr1= Object Manipulation |GROUP1= | ||
|Change the license plates on any vehicle which has plates configured. Max 15 characters are allowed!|DESCRIPTION= | |Change the license plates on any vehicle which has plates configured. Max 15 characters are allowed!|DESCRIPTION= | ||
| vehicle '''setPlateNumber''' string |SYNTAX= | | vehicle '''setPlateNumber''' string |SYNTAX= | ||
Line 24: | Line 21: | ||
| [[Nothing]] |RETURNVALUE= | | [[Nothing]] |RETURNVALUE= | ||
|x1= <code>[[vehicle]] [[player]] '''setPlateNumber''' "Custom Plate 99"</code> |EXAMPLE1= | |x1= <code>[[vehicle]] [[player]] '''setPlateNumber''' "Custom Plate 99"</code> |EXAMPLE1= | ||
Line 42: | Line 38: | ||
} [[forEach]] ([[getText]] (_cfg >> "plateFormat") [[splitString]] ""); | } [[forEach]] ([[getText]] (_cfg >> "plateFormat") [[splitString]] ""); | ||
_car [[setPlateNumber]] _return;</code> |EXAMPLE2= | _car [[setPlateNumber]] _return;</code> |EXAMPLE2= | ||
| [[getPlateNumber]] |SEEALSO= | | [[getPlateNumber]] |SEEALSO= |
Revision as of 02:57, 17 January 2021
Description
- Description:
- Change the license plates on any vehicle which has plates configured. Max 15 characters are allowed!
- Groups:
- Object Manipulation
Syntax
- Syntax:
- vehicle setPlateNumber string
- Parameters:
- vehicle: Object
- string: String
- Return Value:
- Nothing
Examples
- Example 1:
vehicle player setPlateNumber "Custom Plate 99"
- Example 2:
- Reset plate to the world's randomized template:
_return = ""; _cfg = (configFile >> "CfgWorlds" >> worldName); { _return = _return + (call { if (_x == "$") exitWith { selectRandom (getText (_cfg >> "plateLetters") splitString "") }; if (_x == "#") exitWith { selectRandom ["0","1","2","3","4","5","6","7","8","9"] }; _x }); } forEach (getText (_cfg >> "plateFormat") splitString ""); _car setPlateNumber _return;
Additional Information
- See also:
- getPlateNumber
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on April 19, 2018 - 05:34 (UTC)
- demellion
- NOTICE: If this command is performed where argument is remote, the plate will change and getPlateNumber will also return the new value, until vehicle owner sync it back to original in ~10 seconds after.