CapY Posted July 31, 2011 Share Posted July 31, 2011 So i have this , generated by DKR QTtoLua and it doesn't want to start me when i join on the server. Anybody can help ? ------------------------------------- -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: GUI.ui -- -- Date: 31/07/2011 - 01:29:51 -- ------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 600 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "Dialog", false) guiWindowSetSizable(gui["_root"], false) gui[""] = guiCreateButton(125, 268, 75, 24, "Accept", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui[""] = guiCreateButton(206, 268, 75, 24, "Decline", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui["checkBox"] = guiCreateCheckBox(10, 225, 341, 41, "I accept the rules and i will be play fair, will not bother others!", false, false, gui["_root"]) gui["tabWidget"] = guiCreateTabPanel(20, 45, 361, 181, false, gui["_root"]) gui["tab"] = guiCreateTab("Rules", gui["tabWidget"]) gui._placeHolders["textEdit"] = {left = 0, top = 0, width = 361, height = 161, parent = gui["tab"]} gui["tab_2"] = guiCreateTab("Staff", gui["tabWidget"]) gui["scrollArea"] = guiCreateScrollPane(339, 0, 121, 171, false, gui["tab_2"]) return gui, windowWidth, windowHeight end function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end -- End of DKR QT to Lua code -- Link to comment
Castillo Posted July 31, 2011 Share Posted July 31, 2011 ------------------------------------- -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: GUI.ui -- -- Date: 31/07/2011 - 01:29:51 -- ------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 600 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "Dialog", false) guiWindowSetSizable(gui["_root"], false) gui[""] = guiCreateButton(125, 268, 75, 24, "Accept", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui[""] = guiCreateButton(206, 268, 75, 24, "Decline", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui["checkBox"] = guiCreateCheckBox(10, 225, 341, 41, "I accept the rules and i will be play fair, will not bother others!", false, false, gui["_root"]) gui["tabWidget"] = guiCreateTabPanel(20, 45, 361, 181, false, gui["_root"]) gui["tab"] = guiCreateTab("Rules", gui["tabWidget"]) gui._placeHolders["textEdit"] = {left = 0, top = 0, width = 361, height = 161, parent = gui["tab"]} gui["tab_2"] = guiCreateTab("Staff", gui["tabWidget"]) gui["scrollArea"] = guiCreateScrollPane(339, 0, 121, 171, false, gui["tab_2"]) return gui, windowWidth, windowHeight end) function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end -- End of DKR QT to Lua code -- Link to comment
bandi94 Posted July 31, 2011 Share Posted July 31, 2011 missing ")" at line 42 i put the ) for you test it now ------------------------------------- -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: GUI.ui -- -- Date: 31/07/2011 - 01:29:51 -- ------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 600 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "Dialog", false) guiWindowSetSizable(gui["_root"], false) gui[""] = guiCreateButton(125, 268, 75, 24, "Accept", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui[""] = guiCreateButton(206, 268, 75, 24, "Decline", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui[""], on__clicked, false) end gui["checkBox"] = guiCreateCheckBox(10, 225, 341, 41, "I accept the rules and i will be play fair, will not bother others!", false, false, gui["_root"]) gui["tabWidget"] = guiCreateTabPanel(20, 45, 361, 181, false, gui["_root"]) gui["tab"] = guiCreateTab("Rules", gui["tabWidget"]) gui._placeHolders["textEdit"] = {left = 0, top = 0, width = 361, height = 161, parent = gui["tab"]} gui["tab_2"] = guiCreateTab("Staff", gui["tabWidget"]) gui["scrollArea"] = guiCreateScrollPane(339, 0, 121, 171, false, gui["tab_2"]) return gui, windowWidth, windowHeight end) function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end Link to comment
CapY Posted July 31, 2011 Author Share Posted July 31, 2011 Thanks , and what's wrong with this ? -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: gui2.ui -- -- Date: 31/07/2011 - 07:51:20 -- ------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 615 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "TabWidget", false) guiWindowSetSizable(gui["_root"], false) return gui, windowWidth, windowHeight end function(parent) local gui = {} gui._placeHolders = {} gui["label"] = guiCreateLabel(372, 50, 61, 41, "Rules", false, parent) guiSetFont(gui["label"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") gui._placeHolders["textBrowser"] = {left = 12, top = 110, width = 781, height = 411, parent = parent} gui["pushButton"] = guiCreateButton(262, 550, 91, 41, "Accept", false, parent) if on_pushButton_clicked then addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false) end gui["pushButton_2"] = guiCreateButton(422, 550, 91, 41, "Decline", false, parent) if on_pushButton_2_clicked then addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false) end gui["checkBox"] = guiCreateCheckBox(12, 530, 361, 21, "I accept the Rules and Conditions and i will be play fair !", false, false, parent) guiSetFont(gui["checkBox"], "default-bold-small") gui["label_2"] = guiCreateLabel(22, 190, 101, 31, "*DONT HACK!", false, parent) guiSetFont(gui["label_2"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") gui["label_3"] = guiCreateLabel(22, 220, 101, 31, "*DONT ABUSE!", false, parent) guiSetFont(gui["label_3"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") gui["label_4"] = guiCreateLabel(22, 250, 161, 31, "*DONT FLOOD THE CHAT!", false, parent) guiSetFont(gui["label_4"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") gui["label_5"] = guiCreateLabel(22, 280, 101, 31, "*DONT BOTHER!", false, parent) guiSetFont(gui["label_5"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_5"], "left", false) guiLabelSetVerticalAlign(gui["label_5"], "center") gui["label_6"] = guiCreateLabel(22, 310, 211, 31, "*DONT USE MODIFIED HANDLING!", false, parent) guiSetFont(gui["label_6"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_6"], "left", false) guiLabelSetVerticalAlign(gui["label_6"], "center") gui["label_7"] = guiCreateLabel(22, 350, 171, 21, "*DONT USE VISUAL MODS!", false, parent) guiSetFont(gui["label_7"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_7"], "left", false) guiLabelSetVerticalAlign(gui["label_7"], "center") gui._placeHolders["line"] = {left = 12, top = 359, width = 781, height = 91, parent = parent} gui["label_8"] = guiCreateLabel(32, 420, 101, 31, "Have Fun !", false, parent) guiSetFont(gui["label_8"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_8"], "left", false) guiLabelSetVerticalAlign(gui["label_8"], "center") gui["label_9"] = guiCreateLabel(282, 480, 751, 61, "Every rule break will result ban or permaban .", false, parent) guiSetFont(gui["label_9"], "default-small") guiLabelSetHorizontalAlign(gui["label_9"], "left", false) guiLabelSetVerticalAlign(gui["label_9"], "center") return gui end function on_pushButton_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on_pushButton_2_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end Link to comment
bandi94 Posted July 31, 2011 Share Posted July 31, 2011 try this its missing a ")" and " function (parent)" need a name i add "function gui (parent)" i don't know if it will work or not -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: gui2.ui -- -- Date: 31/07/2011 - 07:51:20 -- ------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 615 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "TabWidget", false) guiWindowSetSizable(gui["_root"], false) return gui, windowWidth, windowHeight end) function gui (parent) local gui = {} gui._placeHolders = {} gui["label"] = guiCreateLabel(372, 50, 61, 41, "Rules", false, parent) guiSetFont(gui["label"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") gui._placeHolders["textBrowser"] = {left = 12, top = 110, width = 781, height = 411, parent = parent} gui["pushButton"] = guiCreateButton(262, 550, 91, 41, "Accept", false, parent) if on_pushButton_clicked then addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false) end gui["pushButton_2"] = guiCreateButton(422, 550, 91, 41, "Decline", false, parent) if on_pushButton_2_clicked then addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false) end gui["checkBox"] = guiCreateCheckBox(12, 530, 361, 21, "I accept the Rules and Conditions and i will be play fair !", false, false, parent) guiSetFont(gui["checkBox"], "default-bold-small") gui["label_2"] = guiCreateLabel(22, 190, 101, 31, "*DONT HACK!", false, parent) guiSetFont(gui["label_2"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") gui["label_3"] = guiCreateLabel(22, 220, 101, 31, "*DONT ABUSE!", false, parent) guiSetFont(gui["label_3"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") gui["label_4"] = guiCreateLabel(22, 250, 161, 31, "*DONT FLOOD THE CHAT!", false, parent) guiSetFont(gui["label_4"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") gui["label_5"] = guiCreateLabel(22, 280, 101, 31, "*DONT BOTHER!", false, parent) guiSetFont(gui["label_5"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_5"], "left", false) guiLabelSetVerticalAlign(gui["label_5"], "center") gui["label_6"] = guiCreateLabel(22, 310, 211, 31, "*DONT USE MODIFIED HANDLING!", false, parent) guiSetFont(gui["label_6"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_6"], "left", false) guiLabelSetVerticalAlign(gui["label_6"], "center") gui["label_7"] = guiCreateLabel(22, 350, 171, 21, "*DONT USE VISUAL MODS!", false, parent) guiSetFont(gui["label_7"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_7"], "left", false) guiLabelSetVerticalAlign(gui["label_7"], "center") gui._placeHolders["line"] = {left = 12, top = 359, width = 781, height = 91, parent = parent} gui["label_8"] = guiCreateLabel(32, 420, 101, 31, "Have Fun !", false, parent) guiSetFont(gui["label_8"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_8"], "left", false) guiLabelSetVerticalAlign(gui["label_8"], "center") gui["label_9"] = guiCreateLabel(282, 480, 751, 61, "Every rule break will result ban or permaban .", false, parent) guiSetFont(gui["label_9"], "default-small") guiLabelSetHorizontalAlign(gui["label_9"], "left", false) guiLabelSetVerticalAlign(gui["label_9"], "center") return gui end function on_pushButton_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on_pushButton_2_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end Link to comment
CapY Posted July 31, 2011 Author Share Posted July 31, 2011 Results: http://imageshack.us/f/692/mtascreen20110731084834ph.png/ Only that window pop-ups Link to comment
bandi94 Posted July 31, 2011 Share Posted July 31, 2011 try this -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: gui2.ui -- -- Date: 31/07/2011 - 07:51:20 -- ------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 615 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "TabWidget", false) guiWindowSetSizable(gui["_root"], false) return gui, windowWidth, windowHeight end) addEventHandler("onClientResourceStart",resourceRoot, function (parent) local gui = {} gui._placeHolders = {} gui["label"] = guiCreateLabel(372, 50, 61, 41, "Rules", false, parent) guiSetFont(gui["label"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") gui._placeHolders["textBrowser"] = {left = 12, top = 110, width = 781, height = 411, parent = parent} gui["pushButton"] = guiCreateButton(262, 550, 91, 41, "Accept", false, parent) if on_pushButton_clicked then addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false) end gui["pushButton_2"] = guiCreateButton(422, 550, 91, 41, "Decline", false, parent) if on_pushButton_2_clicked then addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false) end gui["checkBox"] = guiCreateCheckBox(12, 530, 361, 21, "I accept the Rules and Conditions and i will be play fair !", false, false, parent) guiSetFont(gui["checkBox"], "default-bold-small") gui["label_2"] = guiCreateLabel(22, 190, 101, 31, "*DONT HACK!", false, parent) guiSetFont(gui["label_2"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") gui["label_3"] = guiCreateLabel(22, 220, 101, 31, "*DONT ABUSE!", false, parent) guiSetFont(gui["label_3"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") gui["label_4"] = guiCreateLabel(22, 250, 161, 31, "*DONT FLOOD THE CHAT!", false, parent) guiSetFont(gui["label_4"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") gui["label_5"] = guiCreateLabel(22, 280, 101, 31, "*DONT BOTHER!", false, parent) guiSetFont(gui["label_5"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_5"], "left", false) guiLabelSetVerticalAlign(gui["label_5"], "center") gui["label_6"] = guiCreateLabel(22, 310, 211, 31, "*DONT USE MODIFIED HANDLING!", false, parent) guiSetFont(gui["label_6"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_6"], "left", false) guiLabelSetVerticalAlign(gui["label_6"], "center") gui["label_7"] = guiCreateLabel(22, 350, 171, 21, "*DONT USE VISUAL MODS!", false, parent) guiSetFont(gui["label_7"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_7"], "left", false) guiLabelSetVerticalAlign(gui["label_7"], "center") gui._placeHolders["line"] = {left = 12, top = 359, width = 781, height = 91, parent = parent} gui["label_8"] = guiCreateLabel(32, 420, 101, 31, "Have Fun !", false, parent) guiSetFont(gui["label_8"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_8"], "left", false) guiLabelSetVerticalAlign(gui["label_8"], "center") gui["label_9"] = guiCreateLabel(282, 480, 751, 61, "Every rule break will result ban or permaban .", false, parent) guiSetFont(gui["label_9"], "default-small") guiLabelSetHorizontalAlign(gui["label_9"], "left", false) guiLabelSetVerticalAlign(gui["label_9"], "center") return gui end) function on_pushButton_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on_pushButton_2_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end Link to comment
CapY Posted July 31, 2011 Author Share Posted July 31, 2011 I get this : http://imageshack.us/f/853/mtascreen20110731101030.png/ And it's supposted/must be like this : http://imageshack.us/f/6/lol1sz.png/ Link to comment
bandi94 Posted August 1, 2011 Share Posted August 1, 2011 i don't know i only added the missing ")" and added a name to function (it need) and added an event handler on resource start for that function i don't modified positions ... Link to comment
Cadu12 Posted August 1, 2011 Share Posted August 1, 2011 -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: gui2.ui -- -- Date: 31/07/2011 - 07:51:20 -- ------------------------------------- local gui = {} gui._placeHolders = {} addEventHandler("onClientResourceStart",resourceRoot, function() local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 615 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "TabWidget", false) guiWindowSetSizable(gui["_root"], false) end) addEventHandler("onClientResourceStart",resourceRoot, function (parent) gui["label"] = guiCreateLabel(372, 50, 61, 41, "Rules", false, parent) guiSetFont(gui["label"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") gui._placeHolders["textBrowser"] = {left = 12, top = 110, width = 781, height = 411, parent = parent} gui["pushButton"] = guiCreateButton(262, 550, 91, 41, "Accept", false, parent) if on_pushButton_clicked then addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false) end gui["pushButton_2"] = guiCreateButton(422, 550, 91, 41, "Decline", false, parent) if on_pushButton_2_clicked then addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false) end gui["checkBox"] = guiCreateCheckBox(12, 530, 361, 21, "I accept the Rules and Conditions and i will be play fair !", false, false, parent) guiSetFont(gui["checkBox"], "default-bold-small") gui["label_2"] = guiCreateLabel(22, 190, 101, 31, "*DONT HACK!", false, parent) guiSetFont(gui["label_2"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") gui["label_3"] = guiCreateLabel(22, 220, 101, 31, "*DONT ABUSE!", false, parent) guiSetFont(gui["label_3"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") gui["label_4"] = guiCreateLabel(22, 250, 161, 31, "*DONT FLOOD THE CHAT!", false, parent) guiSetFont(gui["label_4"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") gui["label_5"] = guiCreateLabel(22, 280, 101, 31, "*DONT BOTHER!", false, parent) guiSetFont(gui["label_5"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_5"], "left", false) guiLabelSetVerticalAlign(gui["label_5"], "center") gui["label_6"] = guiCreateLabel(22, 310, 211, 31, "*DONT USE MODIFIED HANDLING!", false, parent) guiSetFont(gui["label_6"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_6"], "left", false) guiLabelSetVerticalAlign(gui["label_6"], "center") gui["label_7"] = guiCreateLabel(22, 350, 171, 21, "*DONT USE VISUAL MODS!", false, parent) guiSetFont(gui["label_7"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_7"], "left", false) guiLabelSetVerticalAlign(gui["label_7"], "center") gui._placeHolders["line"] = {left = 12, top = 359, width = 781, height = 91, parent = parent} gui["label_8"] = guiCreateLabel(32, 420, 101, 31, "Have Fun !", false, parent) guiSetFont(gui["label_8"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_8"], "left", false) guiLabelSetVerticalAlign(gui["label_8"], "center") gui["label_9"] = guiCreateLabel(282, 480, 751, 61, "Every rule break will result ban or permaban .", false, parent) guiSetFont(gui["label_9"], "default-small") guiLabelSetHorizontalAlign(gui["label_9"], "left", false) guiLabelSetVerticalAlign(gui["label_9"], "center") end) function on_pushButton_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on_pushButton_2_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end Fixed. And yeah i used Qt to Lua too Link to comment
CapY Posted August 1, 2011 Author Share Posted August 1, 2011 Cadu , the same thing shows up : http://imageshack.us/f/853/mtascreen20110731101030.png/ Link to comment
bandi94 Posted August 1, 2011 Share Posted August 1, 2011 i think ist not the script fix (problem ) its a Qt to LUA scripting bug ( when you transformet Qt to LUA the positions of text was scripted wrong) Link to comment
CapY Posted August 1, 2011 Author Share Posted August 1, 2011 Yep ..and Kayl is not active on MTA anymore Link to comment
CapY Posted August 1, 2011 Author Share Posted August 1, 2011 And what bout this ? ------------------------------------- -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: gui2.ui -- -- Date: 01/08/2011 - 08:20:50 -- ------------------------------------- function build_TabWidget() local gui = {} gui._placeHolders = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 615 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "TabWidget", false) guiWindowSetSizable(gui["_root"], false) return gui, windowWidth, windowHeight end function build_tab(parent) local gui = {} gui._placeHolders = {} gui["label"] = guiCreateLabel(372, 50, 61, 41, "Rules", false, parent) guiSetFont(gui["label"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") gui._placeHolders["textBrowser"] = {left = 12, top = 110, width = 781, height = 411, parent = parent} gui["pushButton"] = guiCreateButton(262, 550, 91, 41, "Accept", false, parent) if on_pushButton_clicked then addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false) end gui["pushButton_2"] = guiCreateButton(422, 550, 91, 41, "Decline", false, parent) if on_pushButton_2_clicked then addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false) end gui["checkBox"] = guiCreateCheckBox(12, 530, 361, 21, "I accept the Rules and Conditions and i will be play fair !", false, false, parent) guiSetFont(gui["checkBox"], "default-bold-small") gui["label_2"] = guiCreateLabel(22, 190, 101, 31, "*DONT HACK!", false, parent) guiSetFont(gui["label_2"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") gui["label_3"] = guiCreateLabel(22, 220, 101, 31, "*DONT ABUSE!", false, parent) guiSetFont(gui["label_3"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") gui["label_4"] = guiCreateLabel(22, 250, 161, 31, "*DONT FLOOD THE CHAT!", false, parent) guiSetFont(gui["label_4"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") gui["label_5"] = guiCreateLabel(22, 280, 101, 31, "*DONT BOTHER!", false, parent) guiSetFont(gui["label_5"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_5"], "left", false) guiLabelSetVerticalAlign(gui["label_5"], "center") gui["label_6"] = guiCreateLabel(22, 310, 211, 31, "*DONT USE MODIFIED HANDLING!", false, parent) guiSetFont(gui["label_6"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_6"], "left", false) guiLabelSetVerticalAlign(gui["label_6"], "center") gui["label_7"] = guiCreateLabel(22, 350, 171, 21, "*DONT USE VISUAL MODS!", false, parent) guiSetFont(gui["label_7"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_7"], "left", false) guiLabelSetVerticalAlign(gui["label_7"], "center") gui._placeHolders["line"] = {left = 12, top = 359, width = 781, height = 91, parent = parent} gui["label_8"] = guiCreateLabel(32, 420, 101, 31, "Have Fun !", false, parent) guiSetFont(gui["label_8"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_8"], "left", false) guiLabelSetVerticalAlign(gui["label_8"], "center") gui["label_9"] = guiCreateLabel(282, 480, 751, 61, "Every rule break will result ban or permaban .", false, parent) guiSetFont(gui["label_9"], "default-small") guiLabelSetHorizontalAlign(gui["label_9"], "left", false) guiLabelSetVerticalAlign(gui["label_9"], "center") return gui end function on_pushButton_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on_pushButton_2_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function build_tab(parent) local gui = {} gui._placeHolders = {} gui["label_10"] = guiCreateLabel(12, 60, 121, 51, "Admins", false, parent) guiSetFont(gui["label_10"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_10"], "left", false) guiLabelSetVerticalAlign(gui["label_10"], "center") return gui end -- End of DKR QT to Lua code -- Link to comment
Jaysds1 Posted August 1, 2011 Share Posted August 1, 2011 try this: -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: gui2.ui -- -- Date: 31/07/2011 - 07:51:20 -- ------------------------------------- local gui = {} gui._placeHolders = {} addEventHandler("onClientResourceStart",resourceRoot, function() local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 615 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "TabWidget", false) guiWindowSetSizable(gui["_root"], false) gui["label"] = guiCreateLabel(372, 50, 61, 41, "Rules", false, gui["_root"]) guiSetFont(gui["label"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") gui._placeHolders["textBrowser"] = {left = 12, top = 110, width = 781, height = 411, gui["_root"] = gui["_root"]} gui["pushButton"] = guiCreateButton(262, 550, 91, 41, "Accept", false, gui["_root"]) if on_pushButton_clicked then addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false) end gui["pushButton_2"] = guiCreateButton(422, 550, 91, 41, "Decline", false, gui["_root"]) if on_pushButton_2_clicked then addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false) end gui["checkBox"] = guiCreateCheckBox(12, 530, 361, 21, "I accept the Rules and Conditions and i will be play fair !", false, false, gui["_root"]) guiSetFont(gui["checkBox"], "default-bold-small") gui["label_2"] = guiCreateLabel(22, 190, 101, 31, "*DONT HACK!", false, gui["_root"]) guiSetFont(gui["label_2"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") gui["label_3"] = guiCreateLabel(22, 220, 101, 31, "*DONT ABUSE!", false, gui["_root"]) guiSetFont(gui["label_3"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") gui["label_4"] = guiCreateLabel(22, 250, 161, 31, "*DONT FLOOD THE CHAT!", false, gui["_root"]) guiSetFont(gui["label_4"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") gui["label_5"] = guiCreateLabel(22, 280, 101, 31, "*DONT BOTHER!", false, gui["_root"]) guiSetFont(gui["label_5"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_5"], "left", false) guiLabelSetVerticalAlign(gui["label_5"], "center") gui["label_6"] = guiCreateLabel(22, 310, 211, 31, "*DONT USE MODIFIED HANDLING!", false, gui["_root"]) guiSetFont(gui["label_6"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_6"], "left", false) guiLabelSetVerticalAlign(gui["label_6"], "center") gui["label_7"] = guiCreateLabel(22, 350, 171, 21, "*DONT USE VISUAL MODS!", false, gui["_root"]) guiSetFont(gui["label_7"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_7"], "left", false) guiLabelSetVerticalAlign(gui["label_7"], "center") gui._placeHolders["line"] = {left = 12, top = 359, width = 781, height = 91, gui["_root"] = gui["_root"]} gui["label_8"] = guiCreateLabel(32, 420, 101, 31, "Have Fun !", false, gui["_root"]) guiSetFont(gui["label_8"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_8"], "left", false) guiLabelSetVerticalAlign(gui["label_8"], "center") gui["label_9"] = guiCreateLabel(282, 480, 751, 61, "Every rule break will result ban or permaban .", false, gui["_root"]) guiSetFont(gui["label_9"], "default-small") guiLabelSetHorizontalAlign(gui["label_9"], "left", false) guiLabelSetVerticalAlign(gui["label_9"], "center") end) function on_pushButton_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on_pushButton_2_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end and What's the problem with this code? Link to comment
CapY Posted August 1, 2011 Author Share Posted August 1, 2011 Gui.lua:22: '}' expected near '=' Link to comment
Cadu12 Posted August 1, 2011 Share Posted August 1, 2011 Try: ------------------------------------- -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: GUI.ui -- -- Date: 31/07/2011 - 01:29:51 -- local gui = {} gui._placeHolders = {}------------------------------------- addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 600 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "Dialog", false) guiWindowSetSizable(gui["_root"], false) gui["clickedAccept"] = guiCreateButton(125, 268, 75, 24, "Accept", false, gui["_root"]) if on__clicked then addEventHandler("onClientGUIClick", gui["clickedAccept"], on__clicked, false) end gui["clickedAccept2"] = guiCreateButton(206, 268, 75, 24, "Decline", false, gui["_root"]) if on__clicked2 then addEventHandler("onClientGUIClick", gui["clickedAccept2"], on__clicked2, false) end gui["checkBox"] = guiCreateCheckBox(10, 225, 341, 41, "I accept the rules and i will be play fair, will not bother others!", false, false, gui["_root"]) gui["tabWidget"] = guiCreateTabPanel(20, 45, 361, 181, false, gui["_root"]) gui["tab"] = guiCreateTab("Rules", gui["tabWidget"]) gui._placeHolders["textEdit"] = {left = 0, top = 0, width = 361, height = 161, parent = gui["tab"]} gui["tab_2"] = guiCreateTab("Staff", gui["tabWidget"]) gui["scrollArea"] = guiCreateScrollPane(339, 0, 121, 171, false, gui["tab_2"]) end function on__clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on__clicked2(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end -- End of DKR QT to Lua code -- Link to comment
CapY Posted August 1, 2011 Author Share Posted August 1, 2011 Cadu12 this is different code what you was posted . I solved gui1 , what you was posted. I need help with gui2 . Link to comment
Jaysds1 Posted August 1, 2011 Share Posted August 1, 2011 try this: --------------------------------- -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: gui2.ui -- -- Date: 01/08/2011 - 08:20:50 -- ------------------------------------- function build_TabWidget(parent) local gui = {} local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 800, 615 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 gui["_root"] = guiCreateWindow(left, top, windowWidth, windowHeight, "TabWidget", false) guiWindowSetSizable(gui["_root"], false) return gui, windowWidth, windowHeight local gui = {} gui._placeHolders = {} gui["label"] = guiCreateLabel(372, 50, 61, 41, "Rules", false, parent) guiSetFont(gui["label"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") gui._placeHolders["textBrowser"] = {left = 12, top = 110, width = 781, height = 411, gui["_root"] = parent} gui["pushButton"] = guiCreateButton(262, 550, 91, 41, "Accept", false, parent) if on_pushButton_clicked then addEventHandler("onClientGUIClick", gui["pushButton"], on_pushButton_clicked, false) end gui["pushButton_2"] = guiCreateButton(422, 550, 91, 41, "Decline", false, parent) if on_pushButton_2_clicked then addEventHandler("onClientGUIClick", gui["pushButton_2"], on_pushButton_2_clicked, false) end gui["checkBox"] = guiCreateCheckBox(12, 530, 361, 21, "I accept the Rules and Conditions and i will be play fair !", false, false, parent) guiSetFont(gui["checkBox"], "default-bold-small") gui["label_2"] = guiCreateLabel(22, 190, 101, 31, "*DONT HACK!", false, parent) guiSetFont(gui["label_2"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") gui["label_3"] = guiCreateLabel(22, 220, 101, 31, "*DONT ABUSE!", false, parent) guiSetFont(gui["label_3"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") gui["label_4"] = guiCreateLabel(22, 250, 161, 31, "*DONT FLOOD THE CHAT!", false, parent) guiSetFont(gui["label_4"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") gui["label_5"] = guiCreateLabel(22, 280, 101, 31, "*DONT BOTHER!", false, parent) guiSetFont(gui["label_5"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_5"], "left", false) guiLabelSetVerticalAlign(gui["label_5"], "center") gui["label_6"] = guiCreateLabel(22, 310, 211, 31, "*DONT USE MODIFIED HANDLING!", false, parent) guiSetFont(gui["label_6"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_6"], "left", false) guiLabelSetVerticalAlign(gui["label_6"], "center") gui["label_7"] = guiCreateLabel(22, 350, 171, 21, "*DONT USE VISUAL MODS!", false, parent) guiSetFont(gui["label_7"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_7"], "left", false) guiLabelSetVerticalAlign(gui["label_7"], "center") gui._placeHolders["line"] = {left = 12, top = 359, width = 781, height = 91, parent = parent} gui["label_8"] = guiCreateLabel(32, 420, 101, 31, "Have Fun !", false, parent) guiSetFont(gui["label_8"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_8"], "left", false) guiLabelSetVerticalAlign(gui["label_8"], "center") gui["label_9"] = guiCreateLabel(282, 480, 751, 61, "Every rule break will result ban or permaban .", false, parent) guiSetFont(gui["label_9"], "default-small") guiLabelSetHorizontalAlign(gui["label_9"], "left", false) guiLabelSetVerticalAlign(gui["label_9"], "center") return gui end function on_pushButton_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function on_pushButton_2_clicked(button, state, absoluteX, absoluteY) if (button ~= "left") or (state ~= "up") then return end --TODO: Implement your button click handler here end function build_tab(parent) local gui = {} gui._placeHolders = {} gui["label_10"] = guiCreateLabel(12, 60, 121, 51, "Admins", false, parent) guiSetFont(gui["label_10"], "default-bold-small") guiLabelSetHorizontalAlign(gui["label_10"], "left", false) guiLabelSetVerticalAlign(gui["label_10"], "center") return gui end -- End of DKR QT to Lua code -- Link to comment
Cadu12 Posted August 1, 2011 Share Posted August 1, 2011 Oh, post scripts(use Qt to LUA) and send me code to fix Link to comment
CapY Posted August 1, 2011 Author Share Posted August 1, 2011 Jaysds1 It doesn't want to start now, lol ! Link to comment
Jaysds1 Posted August 1, 2011 Share Posted August 1, 2011 UCK... Sorry, just use your old script Link to comment
CapY Posted August 2, 2011 Author Share Posted August 2, 2011 Mine old script doesn't works , because i posted the updated gui . Link to comment
Jaysds1 Posted August 3, 2011 Share Posted August 3, 2011 What's the error in the script? Link to comment
CapY Posted August 3, 2011 Author Share Posted August 3, 2011 Read posts again , what else to say 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