Jump to content

The script doesnt shows up


Wes

Recommended Posts

So I made a GUI that should appear when you log in.

It has no functions yet, it'll be a login panel

But whenever I start the server, it is just a black screen, and nothing else, can someone help me?

Link to comment

The script itself

  
GUIEditor = { 
    tabpanel = {}, 
    window = {} 
} 
    function showLoginPanel() 
        GUIEditor.window[1] = guiCreateWindow(457, 348, 603, 277, "MTAProject Bejelentkezés & Regisztráció", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.tabpanel[1] = guiCreateTabPanel(27, 27, 544, 229, false, GUIEditor.window[1]) 
  
        tabLogin = guiCreateTab("Bejelentkezés", GUIEditor.tabpanel[1]) 
  
        username = guiCreateEdit(144, 25, 242, 30, "Felhasználónév", false, tabLogin) 
        password = guiCreateEdit(144, 99, 242, 30, "Jelszó", false, tabLogin) 
        bejelentkezes = guiCreateButton(144, 146, 236, 44, "Bejelentkezés", false, tabLogin) 
  
        tabRegister = guiCreateTab("Regisztráció", GUIEditor.tabpanel[1]) 
  
        regusername = guiCreateEdit(147, 23, 252, 30, "Felhasználónév", false, tabRegister) 
        regpassword = guiCreateEdit(147, 77, 252, 30, "Jelszó", false, tabRegister) 
        register = guiCreateButton(150, 126, 249, 49, "Regisztráció", false, tabRegister)     
    end 
  
  
addEventHandler("onPlayerJoin", getRootElement(), showLoginPanel) 

the meta.xml

    "Teo" description="Login Panel" name="Login Panel" version =" 1.0.0" /> 
    

The debugscript shows nothing interesting.

Link to comment
addEventHandler("onPlayerJoin", getRootElement(), showLoginPanel) 

That's your problem, "onPlayerJoin" is a server side event, you must use "onClientResourceStart".

addEventHandler ( "onClientResourceStart", resourceRoot, showLoginPanel ) 

Link to comment

Oh my god dude, you helped a lot, thank you very much! :)

Another question:

Could you tell me if it is possible to like put the camera into a position, then after 15 seconds it would fly over to another camera position. So not just change the screen but like slowly fly away. Thank you for your help

Link to comment

So for example how can I save the positions that are in mid-air? Cause I wanna make camera positions like these:

6P0EGYf.jpg

I dont know if you understand, I wanna make camera positions like this, from a higher directions, and put them into an array, then change the camera after a few seconds...

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