Jump to content

Start Resource After Login *Help*


Jammie

Recommended Posts

Posted

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!

Posted

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

Posted
function clientLoginSuccessHandler ()
-- show the window stuff
end
addEventHandler("clientLoginSuccess", getRootElement, clientLoginSuccessHandler)

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

getRootElement()

Posted

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.

Posted
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

Posted

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.

Posted

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

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

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

Posted

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

Posted
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.?

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