getUserInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add Example)
m (Fixed incorrect info, added example)
Line 12: Line 12:
|descr= Returns extended information about given server user.
|descr= Returns extended information about given server user.


|s1= [[getUserInfo]] networkID
|s1= [[getUserInfo]] playerID
|p1= networkID : [[String]] - user network id (see [[getPlayerID]], [[allUsers]])
|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: [networkId, owner, playerUID, soldierName, soldierNameInclSquad, steamProfileName, clientStateNumber, isHeadless, adminState, [avgPing, avgBandwidth, desync], playerObject], where:
* networkId : [[String]] - user network id (see [[getPlayerID]], [[allUsers]])
* 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]])
* playerUID : [[String]] - player UID (see [[getPlayerUID]])  
* playerUID : [[String]] - player UID (see [[getPlayerUID]])  
Line 31: Line 31:


|x2= <sqf>
|x2= <sqf>
_userInfo params ["_playerId", "_ownerId", "_playerUID", "_profileName", "_displayName", "_steamName", "_clientState", "_isHC", "_adminState", "_networkInfo", "_unit"];
_userInfo params ["_playerID", "_ownerId", "_playerUID", "_profileName", "_displayName", "_steamName", "_clientState", "_isHC", "_adminState", "_networkInfo", "_unit"];
_networkInfo params ["_avgPing", "_avgBandwidth", "_desync"];
_networkInfo params ["_avgPing", "_avgBandwidth", "_desync"];
</sqf>
</sqf>
|x3= <sqf>private _myInfo = getUserInfo getPlayerID player;</sqf>


|seealso= [[allUsers]] [[getPlayerID]] [[getUnitFreefallInfo]]
|seealso= [[allUsers]] [[getPlayerID]] [[getUnitFreefallInfo]]
}}
}}

Revision as of 23:51, 27 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: [networkId, 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;

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