OnPlayerTriggerEventThreshold: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server event}} {{Added feature/item|1.6.1|1.6.0|22311|This event is triggered when a player exceeds the maximum threshold for events via triggerServerEvent.}} ==Parameters== None ==Source== The source of this event is the player who exceeded the threshold. ===Canceling=== Canceling this event has no effect. ==Example== <syntaxhighlight lang="lua"> function start() setServerConfigSetting("player_triggered_event_inte...") |
m (Update version) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server event}} | {{Server event}} | ||
{{Added feature/item|1.6.1|1.6.0| | {{Added feature/item|1.6.1|1.6.0|22313|This event is triggered when a player exceeds the maximum threshold for events via [[triggerServerEvent]].}} | ||
During each interval (''player_triggered_event_interval''), all usage of [[triggerServerEvent]] will be counted for each player. This includes registered events, non-registered events and non-remote events. | |||
If the count exceeds ''max_player_triggered_events_per_interval'', this event will be fired. The count is reset each interval. | |||
You can set these options via [[setServerConfigSetting]]. | |||
==Parameters== | ==Parameters== | ||
None | None | ||
Line 13: | Line 20: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function processPlayerTriggerEventThreshold() | function processPlayerTriggerEventThreshold() | ||
kickPlayer(source, "Event spam") | kickPlayer(source, "Event spam") |
Latest revision as of 19:20, 28 November 2023
During each interval (player_triggered_event_interval), all usage of triggerServerEvent will be counted for each player. This includes registered events, non-registered events and non-remote events.
If the count exceeds max_player_triggered_events_per_interval, this event will be fired. The count is reset each interval.
You can set these options via setServerConfigSetting.
Parameters
None
Source
The source of this event is the player who exceeded the threshold.
Canceling
Canceling this event has no effect.
Example
function processPlayerTriggerEventThreshold() kickPlayer(source, "Event spam") end addEventHandler("onPlayerTriggerEventThreshold", root, processPlayerTriggerEventThreshold)
See Also
Player events
- onPlayerACInfo
- onPlayerBan
- onPlayerChangeNick
- onPlayerChat
- onPlayerClick
- onPlayerCommand
- onPlayerConnect
- onPlayerContact
- onPlayerDamage
- onPlayerJoin
- onPlayerLogin
- onPlayerLogout
- onPlayerMarkerHit
- onPlayerMarkerLeave
- onPlayerModInfo
- onPlayerMute
- onPlayerNetworkStatus
- onPlayerPickupHit
- onPlayerPickupLeave
- onPlayerPickupUse
- onPlayerPrivateMessage
- onPlayerQuit
- onPlayerScreenShot
- onPlayerSpawn
- onPlayerStealthKill
- onPlayerTarget
- onPlayerUnmute
- onPlayerVehicleEnter
- onPlayerVehicleExit
- onPlayerVoiceStart
- onPlayerVoiceStop
- onPlayerWasted
- onPlayerWeaponFire
- onPlayerWeaponSwitch
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled