Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PlayerManager Interface Reference

Public Member Functions

proto external void KickPlayer (int iPlayerId, PlayerManagerKickReason reason, int timeout=0)
 Kicks player from the game with option to specify timeout for reconnection (temporary ban).
 
proto external int GetPlayerCount ()
 Returns the number of connected players.
 
proto external int GetAllPlayerCount ()
 Returns the number of all players (both connected and disconnected)
 
proto external int GetDisconnectedPlayerCount ()
 Returns the number of disconnected players.
 
proto external int GetPlayers (out notnull array< int > outPlayers)
 Returns the list of connected players.
 
proto external int GetAllPlayers (out notnull array< int > outPlayers)
 Returns the list of all players (both connected and disconnected)
 
proto external int GetDisconnectedPlayers (out notnull array< int > outPlayers)
 Returns the list of disconnected players.
 
proto external string GetPlayerName (int iPlayerId)
 Returns the name of a given player. Empty is player can't be found.
 
proto external IEntity GetPlayerControlledEntity (int iPlayerId)
 Returns the entity controlled by a given player.
 
proto external RespawnComponent GetPlayerRespawnComponent (int iPlayerId)
 Returns respawn component attached to player controller of given player.
 
proto external int GetPlayerIdFromControlledEntity (IEntity controlled)
 Returns the playerId of a player based on a given entity. 0 if not found.
 
proto external int GetPlayerIdFromEntityRplId (int entityRplId)
 
proto external PlayerController GetPlayerController (int iPlayerId)
 Returns the PlayerController of a given player.
 
proto external PlatformKind GetPlatformKind (int iPlayerId)
 Returns the platform kind of a given player.
 
proto external bool IsPlayerConnected (int iPlayerId)
 Returns true if a given player is connected.
 
proto external bool HasPlayerRole (int iPlayerId, EPlayerRole role)
 Returns True if the provided player have given role.
 
proto external EPlayerRole GetPlayerRoles (int iPlayerId)
 Returns player's roles as flags.
 
proto external bool GivePlayerRole (int iPlayerId, EPlayerRole role)
 Sets role of specified player.
 
proto external bool ClearPlayerRole (int iPlayerId, EPlayerRole role)
 Clears role of specified player.
 
proto external void ShowUserProfile (int iPlayerId)
 Shows platform specific UI with the profile of specified player.
 
proto external bool IsUserProfileAvailable (int iPlayerId)
 
proto external bool ShowMultiplayerActivityInvite ()
 Invokes platform UI for selection of players to invite into game/party.
 
proto external bool IsMultiplayerActivityInviteAvailable ()
 

Member Function Documentation

◆ ClearPlayerRole()

proto external bool PlayerManager.ClearPlayerRole ( int  iPlayerId,
EPlayerRole  role 
)

Clears role of specified player.

Can be called only by authority. Returns true if completed successfully.

◆ GetAllPlayerCount()

proto external int PlayerManager.GetAllPlayerCount ( )

Returns the number of all players (both connected and disconnected)

◆ GetAllPlayers()

proto external int PlayerManager.GetAllPlayers ( out notnull array< int >  outPlayers)

Returns the list of all players (both connected and disconnected)

◆ GetDisconnectedPlayerCount()

proto external int PlayerManager.GetDisconnectedPlayerCount ( )

Returns the number of disconnected players.

◆ GetDisconnectedPlayers()

proto external int PlayerManager.GetDisconnectedPlayers ( out notnull array< int >  outPlayers)

Returns the list of disconnected players.

◆ GetPlatformKind()

proto external PlatformKind PlayerManager.GetPlatformKind ( int  iPlayerId)

Returns the platform kind of a given player.

◆ GetPlayerControlledEntity()

proto external IEntity PlayerManager.GetPlayerControlledEntity ( int  iPlayerId)

Returns the entity controlled by a given player.

◆ GetPlayerController()

proto external PlayerController PlayerManager.GetPlayerController ( int  iPlayerId)

Returns the PlayerController of a given player.

◆ GetPlayerCount()

proto external int PlayerManager.GetPlayerCount ( )

Returns the number of connected players.

◆ GetPlayerIdFromControlledEntity()

proto external int PlayerManager.GetPlayerIdFromControlledEntity ( IEntity  controlled)

Returns the playerId of a player based on a given entity. 0 if not found.

◆ GetPlayerIdFromEntityRplId()

proto external int PlayerManager.GetPlayerIdFromEntityRplId ( int  entityRplId)

◆ GetPlayerName()

proto external string PlayerManager.GetPlayerName ( int  iPlayerId)

Returns the name of a given player. Empty is player can't be found.

◆ GetPlayerRespawnComponent()

proto external RespawnComponent PlayerManager.GetPlayerRespawnComponent ( int  iPlayerId)

Returns respawn component attached to player controller of given player.

Note: Only locally owned respawn component is available on remote clients.

Returns
RespawnComponent instance or nullptr if none.

◆ GetPlayerRoles()

proto external EPlayerRole PlayerManager.GetPlayerRoles ( int  iPlayerId)

Returns player's roles as flags.

◆ GetPlayers()

proto external int PlayerManager.GetPlayers ( out notnull array< int >  outPlayers)

Returns the list of connected players.

◆ GivePlayerRole()

proto external bool PlayerManager.GivePlayerRole ( int  iPlayerId,
EPlayerRole  role 
)

Sets role of specified player.

Can be called only by authority. Returns true if completed successfully.

◆ HasPlayerRole()

proto external bool PlayerManager.HasPlayerRole ( int  iPlayerId,
EPlayerRole  role 
)

Returns True if the provided player have given role.

◆ IsMultiplayerActivityInviteAvailable()

proto external bool PlayerManager.IsMultiplayerActivityInviteAvailable ( )
Returns
true if other players could be invited to the session using ShowMultiplayerActivityInvite

◆ IsPlayerConnected()

proto external bool PlayerManager.IsPlayerConnected ( int  iPlayerId)

Returns true if a given player is connected.

◆ IsUserProfileAvailable()

proto external bool PlayerManager.IsUserProfileAvailable ( int  iPlayerId)
Returns
true if profile of specified player could be shown.

◆ KickPlayer()

proto external void PlayerManager.KickPlayer ( int  iPlayerId,
PlayerManagerKickReason  reason,
int  timeout = 0 
)

Kicks player from the game with option to specify timeout for reconnection (temporary ban).

Parameters
playerIdPlayer to be kicked
reasonReason for kick
timeoutTime in seconds, default 0, -1 means infinite

◆ ShowMultiplayerActivityInvite()

proto external bool PlayerManager.ShowMultiplayerActivityInvite ( )

Invokes platform UI for selection of players to invite into game/party.

Fails if no multiplayer activiy is set. Xbox: Puts console into constrained mode

◆ ShowUserProfile()

proto external void PlayerManager.ShowUserProfile ( int  iPlayerId)

Shows platform specific UI with the profile of specified player.

Will do nothing if the specified user is not using same platform.

Parameters
[in]playerIdPlayer which profile will be shown.

The documentation for this interface was generated from the following file: