OnClientPlayerChangeNick

From Multi Theft Auto: Wiki
Revision as of 16:37, 10 January 2010 by Awwu (talk | contribs) (→‎Example)
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 disallows changing a nick.

addEventHandler ( "onClientPlayerChangeNick", getLocalPlayer(),
    function ( oldNick, newNick )
        cancelEvent()
        outputChatBox ( "You can't change your nick!", 255, 0, 0 )
    end
)

See Also

Client player events


Client event functions