izstas Posted February 8, 2008 Share Posted February 8, 2008 Article for this event is not in wiki... Please describe this event Link to comment
Jumba' Posted February 8, 2008 Share Posted February 8, 2008 Well, I suppose the source would be the player that changed his nick, so I guess it would be like function nickChange ( source ) outputChatBox( "Your old nick was better", source, 255, 255, 255 ) end addEventhandler("onClientChangeNick", getRootElement(), nickChange ) but I'm just guessing here, but since most of the events are like that i guess that's how it works maybe there are parameters like newnick and oldnick, but I don't know, maybe a dev can answer that. Link to comment
szlend Posted February 8, 2008 Share Posted February 8, 2008 I think it's onClientChangeNick(source, oldnick, newnick) since the client side function is OnClientPlayerChangeNick(oldnick, newnick) Link to comment
50p Posted February 8, 2008 Share Posted February 8, 2008 Parameters for functions are: - oldnick - newnick and source returned is the player who changed his nick. This is not a function! This is an Event! The way function works is different to the way event works. Function gets attached to event. Link to comment
eAi Posted February 10, 2008 Share Posted February 10, 2008 If you've found something missing on the wiki, please add it for us and everyone else Link to comment
szlend Posted February 10, 2008 Share Posted February 10, 2008 Parameters for functions are:- oldnick - newnick and source returned is the player who changed his nick. This is not a function! This is an Event! The way function works is different to the way event works. Function gets attached to event. With onClientChangeNick(source, oldnick, newnick), I wanted to show which parameters are used by "onClientChangeNick" event. I didn't say you should call function onClientChangeNick Link to comment
Jumba' Posted February 10, 2008 Share Posted February 10, 2008 Does this event even work? I tried everything I could think of, but I couldn't get it to work.. here's my code function nickChange ( source, oldnick, newnick ) outputChatBox( "You have succesfuly changed your nick from" .. oldnick .. " to " .. newnick .. "!", source, 255, 255, 255 ) end addEventHandler("onClientChangeNick", getRootElement(), nickChange ) Link to comment
eAi Posted February 11, 2008 Share Posted February 11, 2008 No, it won't. Remember 'source' is a global variable - you don't specify it as an argument. The syntax is just oldnick, newnick. Link to comment
tma Posted February 11, 2008 Share Posted February 11, 2008 Has anyone got this working ? I've tried everything but I can't make this nick change event fire e.g. no text from this is ever displayed : function nickChange(oldnick,newnick) outputDebugString("NICK CHANGE!") end addEventHandler("onClientChangeNick", getRootElement(), nickChange ) Link to comment
Jumba' Posted February 11, 2008 Share Posted February 11, 2008 No, it won't. Remember 'source' is a global variable - you don't specify it as an argument.The syntax is just oldnick, newnick. I tried that too but it didn't work. 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