setPlateNumber: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|s([0-9])\= ([^' ]+)'''([^' ]+)'''([^ ]*) " to "|s$1= $2$3$4 ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 20: | Line 20: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf> vehicle player setPlateNumber "K2000";</sqf> | ||
|x2= Reset plate to the world's randomized template: | |||
<sqf> | |||
private _return = ""; | |||
private _cfg = (configFile >> "CfgWorlds" >> worldName); | |||
{ | { | ||
_return = _return + ( | _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 | _x | ||
}); | }); | ||
} | } forEach (getText (_cfg >> "plateFormat") splitString ""); | ||
_car | |||
_car setPlateNumber _return; | |||
</sqf> | |||
|seealso= [[getPlateNumber]] | |seealso= [[getPlateNumber]] | ||
}} | }} | ||
{{Note | |||
|user= Demellion | |||
|timestamp= 20180419053400 | |||
|text= '''NOTICE''': If this command is performed where the 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. | |||
}} | |||
'''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. | |||
Revision as of 23:54, 3 May 2022
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:
- Example 2:
- Reset plate to the world's randomized template:
private _return = ""; private _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
- Posted on Apr 19, 2018 - 05:34 (UTC)
- NOTICE: If this command is performed where the 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.