Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:

Sets the rank of the given unit.

Possible values: PRIVATE, CORPORAL, SERGEANT, LIEUTENANT, CAPTAIN, MAJOR, or COLONEL (or whatever commandString is defined for the relevant rank system - see rankSystem).

Syntax

Syntax:unit setRank rank
Parameters:
  • unit: Object - Affected unit.
  • rank: String - Rank name that is defined in the relevant CfgRank class, in the commandString parameter (see Custom Rank System in the VBS3 Developer Reference).
Return Value:Nothing

Examples

Examples:
Set the player in the rank of colonel:
player setRank "COLONEL";
Custom rank for a US-Army unit (Sergeant First Class):
player setRank "SFC";

Additional Information

See also: rank, rankSystem, rankClasses
Multiplayer:
Problems:

Notes