OnClientPlayerChangeNick

From Multi Theft Auto: Wiki
Revision as of 15:33, 27 July 2010 by Dragon (talk | contribs) (→‎Example: made the example a bit more clear)
Jump to navigation Jump to search

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 example snippet sends a lame message every time a player changes his nick.

addEventHandler ( "onClientPlayerChangeNick", getRootElement(),
    function ( oldNick, newNick )
        outputChatBox ( "Hi " .. oldNick .. "! Oh... You're not " .. oldNick .. " anymore, are you?", 0, 255, 0 )
        outputChatBox ( "I like your new name " .. newNick .. "!", 0, 255, 0 )
    end
)

See Also

Client player events


Client event functions