#Paper Posted September 16, 2010 Share Posted September 16, 2010 What is the error? function remotePlayerJoin() function build_main() function showClientImage() guiCreateStaticImage( 10, 10, 501, 181, "logo.png", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage ) local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 527, 587 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "Form", false) guiWindowSetSizable(gui["_root"], false) gui["agree"] = guiCreateButton(10, 525, 511, 51, "Accetto, voglio giocare in questo server!", false, gui["_root"]) if on_agree_clicked then function changeVisibility ( ) guiSetVisible ( myWindow, false ) end end addEventHandler("onClientGUIClick", gui["agree"], on_agree_clicked, false) end gui["plainTextEdit"] = guiCreateMemo(10, 215, 501, 301, "Benvenuto in [MSP]Clan server, ecco un paio di regole che devi ASSOLUTAMENTE seguire:\n\n- E' assolutamente vietato usare cheats.\n\n- E' vietato insultare gli altri giocatori, in quanto loro sono in questo server per divertirsi, e non per ricevere insulti.\n\n- E' vietato insultare gli admin, in quanto loro sono qui per divertirsi e per vegliare sul server, affinchè la prima regola, in primis, e tutte le altre non vengano infrante.\n\n- E' vietato spammare o flooddare nella ChatBox del server, così facendo provochi solamente del lag inutile, e il possibile crash del server, e se questo accade, non si sà quando un admin che può accedere all'host del server potrà di nuovo avviarlo.\n\n- E' vietato spammare in chat link a sitiweb pornografici, personali e a scopo di lucro, se siete autorizzati dallo staff potete farlo, ma sempre con parsimonia.\n\nIl fatto che un admin non sia presente nel server non vuol dire che le regole possono essere infrante, in quanto nel server è presente il comando /report per segnalare players o bug del server.\n\nUn saluto da SuN! ^_^", false, gui["_root"]) guiMemoSetReadOnly(gui["plainTextEdit"], true) return gui, windowWidth, windowHeight end end addEventHandler("onClientPlayerJoin", getRootElement(), remotePlayerJoin) Link to comment
dzek (varez) Posted September 16, 2010 Share Posted September 16, 2010 Read this: viewtopic.php?f=91&t=27027 Also the syntax is TOTALLY WRONG! Get back to basics: https://wiki.multitheftauto.com/wiki/Scr ... troduction How to make GUI's: https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI Link to comment
#Paper Posted September 16, 2010 Author Share Posted September 16, 2010 How "totally" I have used the new programm to create the gui out by MTA Link to comment
dzek (varez) Posted September 16, 2010 Share Posted September 16, 2010 which one? look at these lines: function remotePlayerJoin() function build_main() function showClientImage() function defined inside a function inside a function. afair - it's not invalid in lua, but well, you don't need it. you never trigger build_main() for example, also there is just a mess in this. Better read these tutorials and do one by yourself. 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