|
|
| (2 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| {{BZFS_API_Doc}}
| | #REDIRECT [[Category:BZFS API Docs]] |
| {{BZFS_API_Events}}
| |
| {{API_Docs_that_need_work}}
| |
| | |
| ==Overview==
| |
| The '''bz_eAllowPlayer''' is an API event that is called each time a player joins to allow a plug-in to override the servers allow or deny choice.
| |
| ==Data==
| |
| '''bz_eAllowPlayer''' returns the '''bz_AllowPlayerEventData_V1''' data class.
| |
| | |
| {| border="1" cellpadding="20" cellspacing="0"
| |
| !name
| |
| !type
| |
| !value description
| |
| |-
| |
| |eventType
| |
| |[[Event(API)|bz_eEventType]]
| |
| |bz_eAllowPlayer
| |
| |-
| |
| |playerID
| |
| |int
| |
| |Each client has a player ID, even if that client is not yet in the game yet. This way, every client can be identified using an integer value.
| |
| |-
| |
| |callsign
| |
| |[[bz_ApiString]]
| |
| |The player's callsign
| |
| |-
| |
| |ipAddress
| |
| |[[bz_ApiString]]
| |
| |The IP address of the client which is trying to get into the game
| |
| |-
| |
| |reason
| |
| |[[bz_ApiString]]
| |
| |If a plugin denies the entrance of a player, then that plugin can explain why in this field.
| |
| |-
| |
| |allow
| |
| |bool
| |
| |This value should be set to true by the plugin if that plugin decided to allow the player to enter the game, and false otherwise.
| |
| |-
| |
| |eventTime
| |
| |double
| |
| |This value is the time at which the client requested to enter the game (and thus the event was created).
| |
| |}
| |
| ==Uses==
| |
| A plugin can use this event to use an alternative to a ban list to decide whether a user should be allowed to play on the server. For example, if the server load is temporarily high, then a plugin could deny the entrance of even more users temporarily.
| |
| | |
| [[Category:BZFS_API_Docs]] | |
| [[Category:BZFS_API_Events]]
| |