Wes Posted May 30, 2013 Share Posted May 30, 2013 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
Castillo Posted May 30, 2013 Share Posted May 30, 2013 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. Link to comment
Wes Posted May 30, 2013 Author Share Posted May 30, 2013 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
Castillo Posted May 30, 2013 Share Posted May 30, 2013 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
Wes Posted May 30, 2013 Author Share Posted May 30, 2013 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
Castillo Posted May 30, 2013 Share Posted May 30, 2013 To make that you must use: setCameraMatrix onClientPreRender Link to comment
Wes Posted May 30, 2013 Author Share Posted May 30, 2013 Uhm, so how could I make to move the camera between some positions? Cause I don't really understand this part Link to comment
Castillo Posted May 30, 2013 Share Posted May 30, 2013 Well, you must define some variables and change them inside onClientPreRender, then set position with setCameraMatrix. Link to comment
Wes Posted May 30, 2013 Author Share Posted May 30, 2013 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? Link to comment
Wes Posted May 30, 2013 Author Share Posted May 30, 2013 So for example how can I save the positions that are in mid-air? Cause I wanna make camera positions like these: 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
iPrestege Posted May 30, 2013 Share Posted May 30, 2013 getCameraMatrix setCameraMatrix 'onClientPreRender' or 'onClientRender' and addEventHandler Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now