Jump to content

Wrote 2 functions?


Recommended Posts

Im using the gui to make a window, but the trouble is this, when player join the window appear so i was thinking in bind that winndow for the player, here come the real trouble:

This is an example of lua code, the first code i try.

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
function () 

But later i was thinking in bind that window, so i try to do this:

function onresourceStart() 
bindKey("F1", "down", showgenWindow) 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) 
function showgenWindow() 

I was make the code, when i test it the window not shows when player join, but the bind works fine.

I tryed to make with onPlayerJoin, or onPlayerLogin with root but the windows being not show when players join or login, or bind no work.

What other way i can make the window show's when player join, with the bind working.

Link to comment
You can use bind and this outside a event "onClientResourceStart".

Yes i know that, but what i mean is is i add that event the window not will show at playerjoin, so i need to know how i can call 2 functions, one to bind and th other one to show it at serverjoin.

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