|
Arma Reforger Script API
|
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 owned string | GetPlayerNameByIdentity (string playerIdentity) |
| Get name of the player with the given identity. Empty if not connected and not in player name cache. | |
| 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 () |
Static Public Member Functions | |
| static proto bool | RequestPlayerNameCacheUpdate (array< string > aIdentityIDs) |
| Requests player name cache update. | |
Static Public Attributes | |
| static ref ScriptInvoker< bool > | s_OnPlayerNameCacheUpdateInvoker = new ScriptInvoker<bool>() |
Static Protected Member Functions | |
| static void | OnPlayerNameCacheUpdate (bool success) |
| Event invoked as a result of RequestPlayerNameCacheUpdate. | |
| 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.
| proto external int PlayerManager.GetAllPlayerCount | ( | ) |
Returns the number of all players (both connected and disconnected)
| proto external int PlayerManager.GetAllPlayers | ( | out notnull array< int > | outPlayers | ) |
Returns the list of all players (both connected and disconnected)
| proto external int PlayerManager.GetDisconnectedPlayerCount | ( | ) |
Returns the number of disconnected players.
| proto external int PlayerManager.GetDisconnectedPlayers | ( | out notnull array< int > | outPlayers | ) |
Returns the list of disconnected players.
| proto external PlatformKind PlayerManager.GetPlatformKind | ( | int | iPlayerId | ) |
Returns the platform kind of a given player.
| proto external IEntity PlayerManager.GetPlayerControlledEntity | ( | int | iPlayerId | ) |
Returns the entity controlled by a given player.
| proto external PlayerController PlayerManager.GetPlayerController | ( | int | iPlayerId | ) |
Returns the PlayerController of a given player.
| proto external int PlayerManager.GetPlayerCount | ( | ) |
Returns the number of connected players.
| proto external int PlayerManager.GetPlayerIdFromControlledEntity | ( | IEntity | controlled | ) |
Returns the playerId of a player based on a given entity. 0 if not found.
| proto external int PlayerManager.GetPlayerIdFromEntityRplId | ( | int | entityRplId | ) |
| proto external string PlayerManager.GetPlayerName | ( | int | iPlayerId | ) |
Returns the name of a given player. Empty is player can't be found.
| proto external owned string PlayerManager.GetPlayerNameByIdentity | ( | string | playerIdentity | ) |
Get name of the player with the given identity. Empty if not connected and not in player name cache.
| 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.
| proto external EPlayerRole PlayerManager.GetPlayerRoles | ( | int | iPlayerId | ) |
Returns player's roles as flags.
| proto external int PlayerManager.GetPlayers | ( | out notnull array< int > | outPlayers | ) |
Returns the list of connected players.
| 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.
| proto external bool PlayerManager.HasPlayerRole | ( | int | iPlayerId, |
| EPlayerRole | role ) |
Returns True if the provided player have given role.
| proto external bool PlayerManager.IsMultiplayerActivityInviteAvailable | ( | ) |
| proto external bool PlayerManager.IsPlayerConnected | ( | int | iPlayerId | ) |
Returns true if a given player is connected.
| proto external bool PlayerManager.IsUserProfileAvailable | ( | int | iPlayerId | ) |
| 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).
| playerId | Player to be kicked |
| reason | Reason for kick |
| timeout | Time in seconds, default 0, -1 means infinite |
|
staticprotected |
Event invoked as a result of RequestPlayerNameCacheUpdate.
|
static |
Requests player name cache update.
Invokes OnPlayerNameCacheUpdate when finished.
| 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
| 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.
| [in] | playerId | Player which profile will be shown. |
|
static |