OnClientPlayerChangeNick: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
This disallows changing a nick | This disallows changing a nick | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler ("onClientPlayerChangeNick", getRootElement(), | addEventHandler( "onClientPlayerChangeNick", getRootElement(), | ||
function() | function() | ||
cancelEvent() | cancelEvent() | ||
outputChatBox( "You can't change your nick!", source, 255, 0, 0, false ) | |||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 13:57, 10 January 2010
This event is triggered when a player changes his nickname.
Parameters
string oldNick, string newNick
- oldNick: the nickname the player had before.
- newNick: the new nickname of the player.
Source
The source of this event is the player that changed his nick
Example
This disallows changing a nick
addEventHandler( "onClientPlayerChangeNick", getRootElement(), function() cancelEvent() outputChatBox( "You can't change your nick!", source, 255, 0, 0, false ) end)
See Also
Client player events
- onClientPlayerChangeNick
- onClientPlayerChoke
- onClientPlayerDamage
- onClientPlayerHeliKilled
- onClientPlayerHitByWaterCannon
- onClientPlayerJoin
- onClientPlayerPickupHit
- onClientPlayerPickupLeave
- onClientPlayerQuit
- onClientPlayerRadioSwitch
- onClientPlayerSpawn
- onClientPlayerStealthKill
- onClientPlayerStuntFinish
- onClientPlayerStuntStart
- onClientPlayerTarget
- onClientPlayerVehicleEnter
- onClientPlayerVehicleExit
- onClientPlayerVoicePause
- onClientPlayerVoiceResumed
- onClientPlayerVoiceStart
- onClientPlayerVoiceStop
- onClientPlayerWasted
- onClientPlayerWeaponFire
- onClientPlayerWeaponSwitch
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled