getUserInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 25: Line 25:
* 7 - isHeadless: [[Boolean]] - whether or not this is a headless client (see [[hasInterface]], [[isServer]])
* 7 - isHeadless: [[Boolean]] - whether or not this is a headless client (see [[hasInterface]], [[isServer]])
* 8 - adminState: [[Number]] - admin status of the user (see [[admin]])
* 8 - adminState: [[Number]] - admin status of the user (see [[admin]])
* 9 - networkInfo: [[Array]] of [[Number]]s - format [ping, bandwidth desync]
* 9 - networkInfo: [[Array]] of [[Number]]s - format [ping, bandwidth, desync]
* 10 - playerObject: [[Object]] - user player entity (see [[player]], [[selectPlayer]])
* 10 - playerObject: [[Object]] - user player entity (see [[player]], [[selectPlayer]])



Latest revision as of 18:24, 13 April 2024

Hover & click on the images for description

Description

Description:
Returns extended information about given server user.
Groups:
MultiplayerObject Detection

Syntax

Syntax:
getUserInfo playerID
Parameters:
playerID: String - user DirectPlay ID (see getPlayerID, PlayerConnected)
Return Value:
Array in format [playerID, owner, playerUID, soldierName, displayName, steamProfileName, clientStateNumber, isHeadless, adminState, networkInfo, playerObject], where:
Returns an empty array if said player is not found.

Alternative Syntax

Syntax:
playerID getUserInfo infoIndex
Parameters:
playerID: String - user DirectPlay ID (see getPlayerID, PlayerConnected)
infoIndex: Number - the index of the data in the return array (see main syntax)
Return Value:
Anything - depends on the requested index (see main syntax) or Nothing

Examples

Example 1:
private _randomUserInfo = getUserInfo selectRandom allUsers;
Example 2:
_userInfo params ["_playerID", "_ownerId", "_playerUID", "_profileName", "_displayName", "_steamName", "_clientState", "_isHC", "_adminState", "_networkInfo", "_unit"]; _networkInfo params ["_avgPing", "_avgBandwidth", "_desync"];
Example 3:
private _myInfo = getUserInfo getPlayerID player; // this particular example only works if player is server host

Additional Information

See also:
allUsers getPlayerID getUnitFreefallInfo

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