Jump to content

The script doesnt shows up


Wes

Recommended Posts

Posted

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?

Posted

1: Post the script, we can't help you if you don't.

2: Make sure on the meta.xml, that the script containing the GUI is set as type="client".

3: Open up debugscript and look for errors.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

Posted
addEventHandler("onPlayerJoin", getRootElement(), showLoginPanel) 

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

addEventHandler ( "onClientResourceStart", resourceRoot, showLoginPanel ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Posted

Uhm, so how could I make to move the camera between some positions? Cause I don't really understand this part :D

Posted

Well, you must define some variables and change them inside onClientPreRender, then set position with setCameraMatrix.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Alright, I'm gonna try, the last question, how can I get positions in the air? So I wanna get positions in the air, how can I do that?

Posted

What do you mean by that?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

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