crismar Posted May 20, 2014 Share Posted May 20, 2014 Howdy. So I was trying to change one's name when he changes if, and remove hex from his name. Here's what I tried: addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) outputChatBox('* ' .. oldNick .. ' si-a schimbat numele in ' .. newNick, 255, 0, 0) setPlayerName(getPlayerFromName(newNick), string.gsub(getPlayerName(getPlayerFromName(newNick)), "#%x%x%x%x%x%x", "")) end ) Any ideas why this keeps giving me: Attempt to call global 'setPlayerName' (a nil value) Link to comment
Alexs Posted May 20, 2014 Share Posted May 20, 2014 'setPlayerName' is a server-side function, use 'onPlayerChangeNick'. Link to comment
crismar Posted May 20, 2014 Author Share Posted May 20, 2014 nvm you're right. Thanks. 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