Jump to content

Start Resource After Login *Help*


Jammie

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!

Link to comment

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.

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

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

Link to comment

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.. !!

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

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...