Difference between revisions of "getPlayerUID"
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) |
Killzone Kid (talk | contribs) (description) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
− | | Return an uniqueID of the given unit as string if it's player and empty value if it's AI. The | + | | Return an uniqueID of the given unit as string if it's player and empty value if it's AI. The unique ID may be up to 100 characters long and may contain numbers, uppercase letters and underscores (the value can be used to construct a valid variable name by appending to another valid variable name). |
− | + | <br><br> | |
Note: while for [[ArmA 2]] or [[ArmA 2: Operation Arrowhead]] until version 1.60 the result always contains a number, it should be always handled as an opaque string. Converting it to a [[Number]] can cause precision problems, as Number cannot accurately represent integers above 16777216 (2^24). Moreover, game versions since [[ArmA 2: Operation Arrowhead]] 1.61 provide a non-numeric value as a result.|= Description | Note: while for [[ArmA 2]] or [[ArmA 2: Operation Arrowhead]] until version 1.60 the result always contains a number, it should be always handled as an opaque string. Converting it to a [[Number]] can cause precision problems, as Number cannot accurately represent integers above 16777216 (2^24). Moreover, game versions since [[ArmA 2: Operation Arrowhead]] 1.61 provide a non-numeric value as a result.|= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 20: | Line 20: | ||
|p3= |= PARAMETER3 | |p3= |= PARAMETER3 | ||
− | | [[String]] |= RETURNVALUE | + | | [[String]] ("_SP_AI_", "_SP_PLAYER_" in SP, "" or UID number string in MP) |
− | + | |= RETURNVALUE | |
|x1= <code>_uid <nowiki>=</nowiki> '''getPlayerUID''' [[player]];</code> |= Example 1 | |x1= <code>_uid <nowiki>=</nowiki> '''getPlayerUID''' [[player]];</code> |= Example 1 | ||
Line 29: | Line 29: | ||
| [[getPlayerUIDOld]] |= SEEALSO | | [[getPlayerUIDOld]] |= SEEALSO | ||
− | |mp= | + | |mp= |= MPBEHAVIOUR |
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
}} | }} |
Revision as of 18:52, 8 October 2014
Hover & click on the images for descriptions
Description
- Description:
-
Return an uniqueID of the given unit as string if it's player and empty value if it's AI. The unique ID may be up to 100 characters long and may contain numbers, uppercase letters and underscores (the value can be used to construct a valid variable name by appending to another valid variable name).
Note: while for ArmA 2 or ArmA 2: Operation Arrowhead until version 1.60 the result always contains a number, it should be always handled as an opaque string. Converting it to a Number can cause precision problems, as Number cannot accurately represent integers above 16777216 (2^24). Moreover, game versions since ArmA 2: Operation Arrowhead 1.61 provide a non-numeric value as a result.
Syntax
- Syntax:
- getPlayerUID unit
- Parameters:
- unit: Object
- Return Value:
- String ("_SP_AI_", "_SP_PLAYER_" in SP, "" or UID number string in MP)
Examples
- Example 1:
-
_uid = getPlayerUID player;
Additional Information
- See also:
- getPlayerUIDOld
- Groups:
- Uncategorised
Notes
Notes
- Posted on April 17, 2014 - 22:29
- Master85 (talk)
- In Arma 3 the returned string is the steamID64 of the player.
_steamProfileUrl = "http://steamcommunity.com/profiles/" + (getPlayerUID player);
Bottom Section
Categories:
- Pages using duplicate arguments in template calls
- Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: New Scripting Commands
- Command Group: Uncategorised
- Introduced with Arma 2 version 1.02
- ArmA 2: New Scripting Commands List
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters
- Command Group: Multiplayer