Jullul7000 Posted July 23, 2013 Share Posted July 23, 2013 Is it possible that the nickname always be the same as the player login name ? Is there any resource ? Link to comment
Castillo Posted July 23, 2013 Share 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. Link to comment
WASSIm. Posted July 23, 2013 Share Posted July 23, 2013 addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( _, theCurrentAccount ) setPlayerName ( source, theCurrentAccount ) end ) addEventHandler ( "onPlayerChangeNick", getRootElement ( ), function ( ) cancelEvent() end ) Link to comment
Castillo Posted July 23, 2013 Share 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 ) Link to comment
Jullul7000 Posted July 23, 2013 Author Share Posted July 23, 2013 Guys thank you, Working Link to comment
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