OnClientChangeNick: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: Category:Incomplete Event {{Server event}} __NOTOC__ This event is triggered when a player changes his nickname. ==Parameters== <syntaxhighlight lang="lua"> string oldNick, string newNick </syntaxhighlight> ...)
 
m (Changed "DeprecatedWithAlt" template to "Deprecated")
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Server event}}{{Deprecated|onPlayerChangeNick}}
{{Server event}}
__NOTOC__  
__NOTOC__  
This event is triggered when a player changes his nickname.
This event is triggered when a player changes his nickname.
Line 16: Line 15:
==Example==  
==Example==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
 
function nickChangeHandler(oldNick, newNick)
outputChatBox(oldNick.." is now known as "..newNick, getRootElement(), 255, 100, 100) -- display the message
end
addEventHandler("onClientChangeNick", getRootElement(), nickChangeHandler) -- add an event handler
</syntaxhighlight>
</syntaxhighlight>


==See Also==
{{See also/Server event|Client events}}
===Client player events===
{{Server_player_events}}
===Client event functions===
{{Server_event_functions}}

Latest revision as of 10:22, 18 January 2015

Emblem-important.png This event is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use onPlayerChangeNick instead.


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

function nickChangeHandler(oldNick, newNick)
outputChatBox(oldNick.." is now known as "..newNick, getRootElement(), 255, 100, 100) -- display the message
end
addEventHandler("onClientChangeNick", getRootElement(), nickChangeHandler) -- add an event handler

See Also

Client events


Event functions