peerGetPlayerFlags
Returns the cached flag values for the current player. This is from the key "b_flags".
- PEERBool peerGetPlayerFlags(
- PEER peer,
- const gsi_char * nick,
- RoomType roomType,
- int * flags );
Routine | Required Header | Distribution |
---|---|---|
peerGetPlayerFlags | <peer.h> | SDKZIP |
Return Value
This function returns PEERTrue for success. PEERFalse otherwise.
Parameters
- peer
- [in] Initialized peer object.
- nick
- [in] The players chat nickname.
- roomType
- [in] Can be either TitleRoom, GroupRoom or StagingRoom.
- flags
- [out] The player flags.
Remarks
The peerGetPlayerFlags function will return the cached flag values for the specified player. A server query is not sent at this time. This function will return PEERFalse if the player is not in the specified room. The flags are a per-room setting. That is, if the local player is in multiple rooms with another player, that other player may have different flags in each of the rooms.
Flags might not be available for a player that just joined, or if the local player just joined the room. Also, flags might not be available for players that aren’t using the Peer SDK. However, this function will not return false in that case. Instead, it will just set the flags to empty.
The flags each represent one bit in the "flags" integer. The flags are:
PEER_FLAG_STAGING: the player is in a staging room.
PEER_FLAG_READY: the player is readied up for a game.
PEER_FLAG_PLAYING: the player is playing a game.
PEER_FLAG_AWAY: the player is away.
PEER_FLAG_HOST: the player is the host of the room.
PEER_FLAG_OP: the player is an op (+o) in this room.
PEER_FLAG_VOICE: the player has voice (+v) in this room.
This function will fail if no title is set.
Unicode Mappings
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
peerGetPlayerFlags | peerGetPlayerFlagsA | peerGetPlayerFlagsW |
peerGetPlayerFlagsW and peerGetPlayerFlagsA are UNICODE and ANSI mapped versions of peerGetPlayerFlags. The arguments of peerGetPlayerFlagsA are ANSI strings; those of peerGetPlayerFlagsW are wide-character strings.
Section Reference: Gamespy Peer SDK