Bean666 Posted December 29, 2014 Share Posted December 29, 2014 Hi guys , i have my GUI panel and when i press F2 it works! but it doesnt show the mouse cursor! and i need help is there anyway that the cursor will showup? GUIEditor = { tab = {}, window = {}, tabpanel = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(356, 169, 536, 401, "Paranoia Server Information", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.77) GUIEditor.tabpanel[1] = guiCreateTabPanel(12, -158, 274, 15, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Tab", GUIEditor.tabpanel[1]) GUIEditor.tabpanel[2] = guiCreateTabPanel(9, 20, 517, 371, false, GUIEditor.window[1]) GUIEditor.tab[2] = guiCreateTab("Paranoia", GUIEditor.tabpanel[2]) GUIEditor.memo[1] = guiCreateMemo(12, 11, 495, 326, "Paranoia is a zombie server and semi-rp and it is a server to let people enjoy the scripts ,etcs and Paranoia is based on Surviving , Fighting against the zombies and other teams. and Hope u guys Enjoy!", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tab[3] = guiCreateTab("Rules", GUIEditor.tabpanel[2]) GUIEditor.memo[2] = guiCreateMemo(14, 12, 493, 325, "Paranoia Rules:\n1. Do Not Ask For Staff Rank!\n2. Do Not Ask For Money\n3. Do Not Insult/Flame\n4. No Multi Accounting\n5. No Advertising Other Servers\n6. Stop Annoying Staffs\n7. No Deathmatching\n8. No Trolling!\n9. Do Not Helikill / Carkill!\n10. Do Not Spam the Chat!", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.tab[4] = guiCreateTab("Updates", GUIEditor.tabpanel[2]) GUIEditor.memo[3] = guiCreateMemo(14, 11, 493, 326, "Updates:\nN/A", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.tab[5] = guiCreateTab("Staff Team", GUIEditor.tabpanel[2]) GUIEditor.memo[4] = guiCreateMemo(12, 12, 495, 325, "Staff Team:\nOwner: Shaman\nHQ Staffs: N/A\nAdmins: N/A\nModerators: N/A\nProbationaries: N/A", false, GUIEditor.tab[5]) guiMemoSetReadOnly(GUIEditor.memo[4], true) end ) function toggleVisible ( ) guiSetVisible ( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) ) end bindKey( "F2", "down", toggleVisible) Link to comment
Bean666 Posted December 29, 2014 Author Share Posted December 29, 2014 (edited) ok Edited December 29, 2014 by Guest Link to comment
xeon17 Posted December 29, 2014 Share Posted December 29, 2014 Just put it on the first line in the function or it's too hard for you? Link to comment
Bean666 Posted December 29, 2014 Author Share Posted December 29, 2014 doesnt work when i press F2 , GUi doesnt appear anymore. Link to comment
LabiVila Posted December 29, 2014 Share Posted December 29, 2014 GUIEditor = { tab = {}, window = {}, tabpanel = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(356, 169, 536, 401, "Paranoia Server Information", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.77) GUIEditor.tabpanel[1] = guiCreateTabPanel(12, -158, 274, 15, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Tab", GUIEditor.tabpanel[1]) GUIEditor.tabpanel[2] = guiCreateTabPanel(9, 20, 517, 371, false, GUIEditor.window[1]) GUIEditor.tab[2] = guiCreateTab("Paranoia", GUIEditor.tabpanel[2]) GUIEditor.memo[1] = guiCreateMemo(12, 11, 495, 326, "Paranoia is a zombie server and semi-rp and it is a server to let people enjoy the scripts ,etcs and Paranoia is based on Surviving , Fighting against the zombies and other teams. and Hope u guys Enjoy!", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tab[3] = guiCreateTab("Rules", GUIEditor.tabpanel[2]) GUIEditor.memo[2] = guiCreateMemo(14, 12, 493, 325, "Paranoia Rules:\n1. Do Not Ask For Staff Rank!\n2. Do Not Ask For Money\n3. Do Not Insult/Flame\n4. No Multi Accounting\n5. No Advertising Other Servers\n6. Stop Annoying Staffs\n7. No Deathmatching\n8. No Trolling!\n9. Do Not Helikill / Carkill!\n10. Do Not Spam the Chat!", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.tab[4] = guiCreateTab("Updates", GUIEditor.tabpanel[2]) GUIEditor.memo[3] = guiCreateMemo(14, 11, 493, 326, "Updates:\nN/A", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.tab[5] = guiCreateTab("Staff Team", GUIEditor.tabpanel[2]) GUIEditor.memo[4] = guiCreateMemo(12, 12, 495, 325, "Staff Team:\nOwner: Shaman\nHQ Staffs: N/A\nAdmins: N/A\nModerators: N/A\nProbationaries: N/A", false, GUIEditor.tab[5]) guiMemoSetReadOnly(GUIEditor.memo[4], true) end ) function toggleVisible ( ) guiSetVisible ( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) ) if (guiGetVisible (GUIEditor.window[1]) == true) then showCursor (true) else showCursor (false) end end bindKey( "F2", "down", toggleVisible) should work now Link to comment
Bean666 Posted December 29, 2014 Author Share Posted December 29, 2014 Thank u @Labivila it works now but is it possible that when i login , it doesnt show up? or if i start resource? because when i remove addeventhandler onresource start , it doesnt work Link to comment
LabiVila Posted December 29, 2014 Share Posted December 29, 2014 Didn't quite get you, you mean, if player is logged in, you won't be able to toggle that, right? Link to comment
Bean666 Posted December 29, 2014 Author Share Posted December 29, 2014 yes , if a player logs in , it wont show up . and if resource started , it wont show up automatically. i want my gui can be shown up manually , only by pressing F1. Link to comment
LabiVila Posted December 29, 2014 Share Posted December 29, 2014 GUIEditor = { tab = {}, window = {}, tabpanel = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(356, 169, 536, 401, "Paranoia Server Information", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.77) guiSetVisible (GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(12, -158, 274, 15, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Tab", GUIEditor.tabpanel[1]) GUIEditor.tabpanel[2] = guiCreateTabPanel(9, 20, 517, 371, false, GUIEditor.window[1]) GUIEditor.tab[2] = guiCreateTab("Paranoia", GUIEditor.tabpanel[2]) GUIEditor.memo[1] = guiCreateMemo(12, 11, 495, 326, "Paranoia is a zombie server and semi-rp and it is a server to let people enjoy the scripts ,etcs and Paranoia is based on Surviving , Fighting against the zombies and other teams. and Hope u guys Enjoy!", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tab[3] = guiCreateTab("Rules", GUIEditor.tabpanel[2]) GUIEditor.memo[2] = guiCreateMemo(14, 12, 493, 325, "Paranoia Rules:\n1. Do Not Ask For Staff Rank!\n2. Do Not Ask For Money\n3. Do Not Insult/Flame\n4. No Multi Accounting\n5. No Advertising Other Servers\n6. Stop Annoying Staffs\n7. No Deathmatching\n8. No Trolling!\n9. Do Not Helikill / Carkill!\n10. Do Not Spam the Chat!", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.tab[4] = guiCreateTab("Updates", GUIEditor.tabpanel[2]) GUIEditor.memo[3] = guiCreateMemo(14, 11, 493, 326, "Updates:\nN/A", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.tab[5] = guiCreateTab("Staff Team", GUIEditor.tabpanel[2]) GUIEditor.memo[4] = guiCreateMemo(12, 12, 495, 325, "Staff Team:\nOwner: Shaman\nHQ Staffs: N/A\nAdmins: N/A\nModerators: N/A\nProbationaries: N/A", false, GUIEditor.tab[5]) guiMemoSetReadOnly(GUIEditor.memo[4], true) end ) function toggleVisible ( ) guiSetVisible ( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) ) if (guiGetVisible (GUIEditor.window[1]) == true) then showCursor (true) else showCursor (false) end end bindKey ("F2", "down", toggleVisible) Link to comment
Bean666 Posted December 29, 2014 Author Share Posted December 29, 2014 ty it works now ^^ Link to comment
LabiVila Posted December 30, 2014 Share Posted December 30, 2014 ty it works now ^^ You're welcome 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