ertlflorian1 Posted March 6, 2013 Posted March 6, 2013 When somebody makes / nick it wouldn change the name on the Server but in the Settings. How can i make that the name wouldnt change in the settings? addEventHandler ( "onPlayerChangeNick", getRootElement(),function(old) cancelEvent() outputChatBox ("Du darfst deinen Namen nicht umändern! Frage einen Admin!", source, 255,0,0) end)
PaiN^ Posted March 6, 2013 Posted March 6, 2013 That code should work !! " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
ertlflorian1 Posted March 6, 2013 Author Posted March 6, 2013 Yes it work the Name wouldnt change on the server but in the settings??
iPrestege Posted March 6, 2013 Posted March 6, 2013 What's the fuc K problem if the nick wasn't change in the setting?
PaiN^ Posted March 6, 2013 Posted March 6, 2013 What do you mean in the settings ? You mean if you changed your nick from the settings, It changes .? " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
PaiN^ Posted March 6, 2013 Posted March 6, 2013 What do you mean in the settings ?You mean if you changed your nick from the settings, It changes .? If so ... Yes it will cahnge but realy it won't change. " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
xXMADEXx Posted March 7, 2013 Posted March 7, 2013 You could also, remove "cancelEvent()" and just make it set the name, to what it was like: addEventHandler ( "onPlayerChangeNick", root, function (old) setPlayerName(source,old) outputChatBox ("Du darfst deinen Namen nicht umändern! Frage einen Admin!", source, 255,0,0) end ) The Ultimate Lua Tutorial! | MTA PHP SDK
Castillo Posted March 7, 2013 Posted March 7, 2013 cancelEvent should work just fine. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted March 7, 2013 Posted March 7, 2013 cancelEvent should work just fine. Yes it will work but in game setting it will change here is the problem ( =
Castillo Posted March 7, 2013 Posted March 7, 2013 That's not true, on my server I don't want players to use color codes on their nick, and when I try to set them on the settings, it cancels the event as well. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted March 7, 2013 Posted March 7, 2013 That's not true, on my server I don't want players to use color codes on their nick, and when I try to set them on the settings, it cancels the event as well. Try this guy code the name realy it won't change but in the setting it will change!
PaiN^ Posted March 7, 2013 Posted March 7, 2013 That's not true, on my server I don't want players to use color codes on their nick, and when I try to set them on the settings, it cancels the event as well. Sorry for interrupting, But how i can do that ? I mean not allowing players to use color codes in nicknames .? " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
PaiN^ Posted March 7, 2013 Posted March 7, 2013 "onPlayerConnect" string.find cancelEvent Thanx ^^ " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Castillo Posted March 7, 2013 Posted March 7, 2013 That's not true, on my server I don't want players to use color codes on their nick, and when I try to set them on the settings, it cancels the event as well. Try this guy code the name realy it won't change but in the setting it will change! It'll appear as changed, but it won't change in game. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iPrestege Posted March 7, 2013 Posted March 7, 2013 Yes but if you change that server have that script it will be the new one
Castillo Posted March 7, 2013 Posted March 7, 2013 He wants to prevent players from changing nick inside his server, that script does it, what's the problem if players leave the server and get the new nick he set from the settings? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted March 7, 2013 Posted March 7, 2013 "Yes" doesn't answer my question. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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