KainDepZai Posted March 19, 2015 Share Posted March 19, 2015 function nick (account, source) local name = getPlayerName ( source ) local account = getAccountName () if ( name ) then if getElementType ( name ) == "player" then local oldName = getPlayerName ( name ) setPlayerName ( name, account ) outputChatBox("Your character name is" ..account.. "!") end else end end addEventHandler("onPlayerLogin", root, nick) please check and help me, i want to set player nick = account player register sorry for my english Link to comment
xeon17 Posted March 19, 2015 Share Posted March 19, 2015 addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( _, theCurrentAccount ) setPlayerName ( source, getAccountName ( theCurrentAccount ) ) end ) addEventHandler ( "onPlayerChangeNick", getRootElement ( ), function ( ) cancelEvent() end ) lua] Link to comment
KainDepZai Posted March 19, 2015 Author Share Posted March 19, 2015 Thanks for helped me )) 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