Ramyxfa Posted September 10, 2015 Share Posted September 10, 2015 Yo can u give me code of making that making command /updates open an gui ? help , thanks + i made an memo but can i make that no one can press on it and edit it [ make new text Link to comment
JR10 Posted September 10, 2015 Share Posted September 10, 2015 Create the gui and use guiSetVisible to hide it, then use addCommandHandler with guiSetVisible to show it again, shouldn't be hard. addCommandHandler('updates', function() guiSetVisible(WINDOW, true) end) You can use guiMemoSetReadOnly to disable editing a memo: local memo = guiCreateMemo(...) guiMemoSetReadOnly(memo, false) Link to comment
Ramyxfa Posted September 10, 2015 Author Share Posted September 10, 2015 gonna try it Link to comment
Ramyxfa Posted September 10, 2015 Author Share Posted September 10, 2015 Please help is that good code : GUIEditor = { tab = {}, tabpanel = {}, button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(327, 160, 664, 518, "CIP Updates ", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "Visible", "False") guiSetProperty(GUIEditor.window[1], "Text", "CIP Updates ") GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 204, 645, 304, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Updates", GUIEditor.tabpanel[1]) GUIEditor.memo[1] = guiCreateMemo(0, 1, 645, 278, "", false, GUIEditor.tab[1]) GUIEditor.memo[2] = guiCreateMemo(0, 1, 645, 278, "Thursday, September 10, 2015\nAdd updates panel use /updates to open it \nAdded gun shop ", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(514, 193, 140, 37, "Close", false, GUIEditor.window[1]) end ) addEventHandler("onClientRender", root, function() dxDrawText("", 913, 183, 982, 200, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end )addCommandHandler('updates', function() guiSetVisible(WINDOW, true) end) Link to comment
JR10 Posted September 10, 2015 Share Posted September 10, 2015 No, it's not. You're not hiding the window after it's created, which will result in it showing up as soon as the resource start. There's a useless, empty, dx text. Also, WINDOW is not defined, you need to replace it with GUIEditor.window[1]. Next time, don't post code and ask if it's "good", try it yourself and tell us if it outputs errors or warnings. Link to comment
Ramyxfa Posted September 10, 2015 Author Share Posted September 10, 2015 ERROR : didnt find an cilent.lua i have already :/http://i.imgur.com/HPwV3kA.png Link to comment
JR10 Posted September 10, 2015 Share Posted September 10, 2015 Try 'refresh' in the console, you might have changed it without refreshing. Link to comment
Ramyxfa Posted September 10, 2015 Author Share Posted September 10, 2015 Try 'refresh' in the console, you might have changed it without refreshing. ERROR: Couldn't find script client.lua for resource CIPupdates 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