KainDepZai Posted March 19, 2015 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
xeon17 Posted March 19, 2015 Posted March 19, 2015 addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( _, theCurrentAccount ) setPlayerName ( source, getAccountName ( theCurrentAccount ) ) end ) addEventHandler ( "onPlayerChangeNick", getRootElement ( ), function ( ) cancelEvent() end ) lua]
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