getUserInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
Tag: Undo
mNo edit summary
Line 15: Line 15:
|p1= playerID : [[String]] - user DirectPlay ID (see [[getPlayerID]], [[Arma 3: Mission Event Handlers#PlayerConnected|PlayerConnected]])
|p1= playerID : [[String]] - user DirectPlay ID (see [[getPlayerID]], [[Arma 3: Mission Event Handlers#PlayerConnected|PlayerConnected]])


|r1= [[Array]] in format: [networkId, owner, playerUID, soldierName, soldierNameInclSquad, steamProfileName, clientStateNumber, isHeadless, adminState, [avgPing, avgBandwidth, desync], playerObject], where:
|r1= [[Array]] in format: [playerID, owner, playerUID, soldierName, soldierNameInclSquad, steamProfileName, clientStateNumber, isHeadless, adminState, [avgPing, avgBandwidth, desync], playerObject], where:
* playerID : [[String]] - user DirectPlay ID (see [[getPlayerID]], [[Arma 3: Mission Event Handlers#PlayerConnected|PlayerConnected]])
* playerID : [[String]] - user DirectPlay ID (see [[getPlayerID]], [[Arma 3: Mission Event Handlers#PlayerConnected|PlayerConnected]])
* owner : [[Number]] - user owner (see [[owner]])
* owner : [[Number]] - user owner (see [[owner]])

Revision as of 00:23, 28 March 2022

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, soldierNameInclSquad, steamProfileName, clientStateNumber, isHeadless, adminState, [avgPing, avgBandwidth, desync], playerObject], where:

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