OnPlayerChangesWorldSpecialProperty: Difference between revisions
Jump to navigation
Jump to search
(Add contents) |
(Grammar corrections) |
||
(One intermediate revision 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|0|This event is triggered every a [[player]] calls setWorldSpecialPropertyEnabled.}} | {{Important Note|This event is currently not available for use, as there is no new nightly build yet. Please wait patiently and keep an eye on the page for further updates.}} | ||
{{Added feature/item|1.6.1|1.6.0|0|This event is triggered every time a [[player]] calls [[setWorldSpecialPropertyEnabled]].}} | |||
==Parameters== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Latest revision as of 19:54, 27 November 2024
Important Note: This event is currently not available for use, as there is no new nightly build yet. Please wait patiently and keep an eye on the page for further updates. |
Parameters
string property, bool enabled
- property: The name of the property
- enabled: The property's state
Source
The source of this event is the player who changed a special property.
Canceling
This event cannot be cancelled.
Example
The example below bans the player if a cheat is activated
local cheats = { ["hovercars"] = true, ["aircars"] = true, ["extrabunny"] = true, ["extrajump"] = true } addEventHandler("onPlayerChangesWorldSpecialProperty", root, function(property, enabled) if not cheats[property] then return end if not enabled then return end banPlayer(source, false, false, true, "Server", "Time to take a permanent break :-)") end )
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