Jullul7000 Posted July 23, 2013 Posted July 23, 2013 Is it possible that the nickname always be the same as the player login name ? Is there any resource ?
Castillo Posted July 23, 2013 Posted July 23, 2013 You can set their nick to their login name on login, then when they try to change nick, you don't let them.
WASSIm. Posted July 23, 2013 Posted July 23, 2013 addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( _, theCurrentAccount ) setPlayerName ( source, theCurrentAccount ) end ) addEventHandler ( "onPlayerChangeNick", getRootElement ( ), function ( ) cancelEvent() end )
Castillo Posted July 23, 2013 Posted July 23, 2013 That's wrong, "theCurrentAccount" will return an account element, you need the name, so: addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( _, theCurrentAccount ) setPlayerName ( source, getAccountName ( theCurrentAccount ) ) end ) addEventHandler ( "onPlayerChangeNick", getRootElement ( ), function ( ) cancelEvent() end )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now