void update()
Update the record with the latest player information
Available since 2.4.0
The bz_BasePlayerRecord is an API class that is provided to expose information about a connected player to the plug-in.
bz_BasePlayerRecord ()
These are public data attributes available in this class
Data Type | Name | Description |
---|---|---|
int | version |
The version number of this API class |
int | playerID |
The player ID for the player. |
bz_ApiString | callsign |
The username/callsign for the player. |
bz_eTeamType | team |
The team the player is currently on. |
bz_ApiString | ipAddress |
The Internet Protocol v4 address of the connected client |
int | currentFlagID |
The ID of the flag the player is carrying |
bz_ApiString | currentFlag |
The flag abbreviation of the flag the player is carrying |
bz_APIStringList | flagHistory |
A list of strings representing the names of all the flags the player has held, in order from newest to oldest. |
float | lastUpdateTime |
The server time of the last player update |
bz_PlayerUpdateState | lastKnownState |
The state record that was last sent |
bz_ApiString | clientVersion |
The version string of the player's BZFlag client |
bool | spawned |
True if the user has spawned and is playing. |
bool | verified |
True if the user has authenticated with the login system. Comparable to a user having a "+" in the scoreboard. |
bool | globalUser |
True if the user name was authenticated using the global login system as opposed to a local one. |
bz_ApiString | bzID |
The globally unique ID for authenticated users. |
bool | admin |
Is true by default if user has the BAN permission. Sets the "@" sign. |
bool | op |
True if the user is identified as a server operator via /password |
bool | canSpawn |
True if the player is allowed to spawn |
bz_APIStringList | groups |
The list of groups the user is a member of |
int | lag |
The user's current lag amount in milliseconds. |
int | jitter |
The user's current jitter amount in milliseconds. |
float | packetloss |
The user's current packet loss percentage. |
float | rank |
The player's ranking approximated as wins divided by the sum of wins and losses |
int | wins |
The number of kills the user has had. |
int | losses |
The number of deaths the user has had |
int | teamKills |
The number of team mates the user has killed. |
bz_ApiString | motto |
The player's motto; available in bz_PlayerRecordV2 |
void update()
Update the record with the latest player information
bool hasPerm(const char* perm)
Check if a player has the given permission
Parameters | ||
---|---|---|
const char* | perm |
The permission to check |
bool grantPerm(const char* perm)
Grant the given player a permission
Parameters | ||
---|---|---|
const char* | perm |
The permission to grant |
bool revokePerm(const char* perm)
Revoke a permission from the given player
Parameters | ||
---|---|---|
const char* | perm |
The permission to revoke |
This content is maintained on GitHub. We welcome any feedback and improvements!