Jammie Posted July 26, 2009 Posted July 26, 2009 Hi, I have a logingui. but i want that he start the welcome window + spawner after you login.I have put this in that welcome window & spawner: addEventHandler("clientLoginSuccess",localRootElement,clientLoginSuccessHandler). Then he do nothing.. Can someone help me with this problem! which line must i add to welcome window and the spawner?. Thanks!
Thehookerkiller01 Posted July 26, 2009 Posted July 26, 2009 (edited) function ingelogd (thePlayer) -- do the window stuff and the spawn menu here end addEventHandler("onClientLogin", getRootElement(), ingelogd) Edited July 26, 2009 by Guest ============
ArmedGuy Posted July 26, 2009 Posted July 26, 2009 there is no clientloginSuccess but there is a onClientLogin
Jammie Posted July 26, 2009 Author Posted July 26, 2009 Thanks for reply, but where i put this ??? because there also a line with: addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), Thnx!! add me: [email protected] i dont understand
DakiLLa Posted July 26, 2009 Posted July 26, 2009 function clientLoginSuccessHandler () -- show the window stuff end addEventHandler("clientLoginSuccess", getRootElement, clientLoginSuccessHandler) will fail, cse of 'getRootElement', it should be with brackets () getRootElement()
robhol Posted July 26, 2009 Posted July 26, 2009 Just a quick note: do not listen to Thehookerkiller01. He doesn't know what he's talking about and I really don't get why he keeps answering questions when he doesn't have one faint clue about what he's doing. Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
Jammie Posted July 26, 2009 Author Posted July 26, 2009 Hi Robhol, Can u add me please? [email protected] I have more questions about MTA Client Encrypter:) You make something? But about this subject.. i dont know how.. can u help me too?? Thanks!
Thehookerkiller01 Posted July 26, 2009 Posted July 26, 2009 Jammie did add the getRootElement stuff ;l ============
Jammie Posted July 26, 2009 Author Posted July 26, 2009 add me ?? i dont now how.. i send the script.. if i see then i know for the next time:) i waiting on you..
Prieto_Galletini Posted July 26, 2009 Posted July 26, 2009 add me ?? i dont now how.. i send the script.. if i see then i know for the next time:)i waiting on you.. why dont you take a look at the wiki first then try to make a script and if it does not work then come here to ask for help or on mirc, thats what we do or at least me haha
Thehookerkiller01 Posted July 26, 2009 Posted July 26, 2009 I had edit my post. Look at it. ============
robhol Posted July 26, 2009 Posted July 26, 2009 Jammie: I don't give help anywhere else than these forums, and definitely not when you apparently don't even try - this is a matter of adding two symbols into your code... Sorry. Thehookerkiller01: Whether or not you edited the post later is completely irrelevant. The important thing here is you providing "solutions" that are dead wrong. This is confusing for people who just want help, and annoying to the people who know what they're doing. Please just stop answering until you get a clue. Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
robhol Posted July 27, 2009 Posted July 27, 2009 But you aren't helping him. You can't even help yourself. You're just confusing him by posting wrongful information. Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
DutchCaffeine Posted July 27, 2009 Posted July 27, 2009 function ingelogd (thePlayer) -- do the window stuff and the spawn menu here end addEventHandler("onClientLogin", getRootElement(), ingelogd) better do: function logedin(thePlayer) -- Do something here you always want to do. end addEventHandler("onClientLogin", getResourceRootElement(getThisResource()), logedin) Tip use always English in a program file, it will be cleaner and better to understand. Why i'm using 'getResourceRootElement(getThisResource())' Easy, if you start up an other resource in game, it won't call the function of the event. Why looking here, while my post is up there /\
Lordy Posted July 27, 2009 Posted July 27, 2009 function ingelogd (thePlayer) -- do the window stuff and the spawn menu here end addEventHandler("onClientLogin", getRootElement(), ingelogd) better do: function logedin(thePlayer) -- Do something here you always want to do. end addEventHandler("onClientLogin", getResourceRootElement(getThisResource()), logedin) Tip use always English in a program file, it will be cleaner and better to understand. Why i'm using 'getResourceRootElement(getThisResource())' Easy, if you start up an other resource in game, it won't call the function of the event. Why o why. onClientLogin is totally irrelevant on which resource was it fired on. It's not onResourceStart there, it's onClientLogin.
Jammie Posted July 27, 2009 Author Posted July 27, 2009 It works!! but i have a bigger problem then... if i add this line: addEventHandler( "clientLoginSuccess", getRootElement(), then it works only every time someone logging in my server then comes the spawner visible... eveytime who logging in maybe local?? but i dont know how.. !!
DutchCaffeine Posted July 27, 2009 Posted July 27, 2009 function ingelogd (thePlayer) -- do the window stuff and the spawn menu here end addEventHandler("onClientLogin", getRootElement(), ingelogd) better do: function logedin(thePlayer) -- Do something here you always want to do. end addEventHandler("onClientLogin", getResourceRootElement(getThisResource()), logedin) Tip use always English in a program file, it will be cleaner and better to understand. Why i'm using 'getResourceRootElement(getThisResource())' Easy, if you start up an other resource in game, it won't call the function of the event. Why o why. onClientLogin is totally irrelevant on which resource was it fired on. It's not onResourceStart there, it's onClientLogin. OOps true..... Uhm, can you explain your problem better.? Why looking here, while my post is up there /\
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