Sign in to follow this  
Jammie

Start Resource After Login *Help*

Recommended Posts

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!

Share this post


Link to post
function ingelogd (thePlayer)
-- do the window stuff and the spawn menu here
end
addEventHandler("onClientLogin", getRootElement(), ingelogd)

Edited by Guest

Share this post


Link to post

Thanks for reply, but where i put this ??? because there also a line with: addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ),

Thnx!! add me: JammiedeJong@Live.nl

i dont understand :D

Share this post


Link to post
function clientLoginSuccessHandler ()
-- show the window stuff
end
addEventHandler("clientLoginSuccess", getRootElement, clientLoginSuccessHandler)

will fail, cse of 'getRootElement', it should be with brackets ()

getRootElement()

Share this post


Link to post

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.

Share this post


Link to post

Hi Robhol,

Can u add me please?

JammiedeJong@Live.nl

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!

Share this post


Link to post

add me ?? :P i dont now how.. i send the script.. if i see then i know for the next time:)

i waiting on you..

Share this post


Link to post
add me ?? :P 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

Share this post


Link to post

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.

Share this post


Link to post

But you aren't helping him. You can't even help yourself. You're just confusing him by posting wrongful information.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post

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 :S

maybe local?? but i dont know how.. !!

Share this post


Link to post
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.?

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.