toptional Posted November 15, 2012 Posted November 15, 2012 What is wrong with this GUI, Please fix thanks! Planecarmarker = createMarker ( 1684.59326, 1453.62866, 9.76983 , "cylinder", 2, 9, 233, 213, 105 ) function MarkerHit (hitPlayer, matchingDimension ) guiSetVisible (GUIEditor_Window[3], true ) end addEventHandler ( "onClientMarkerHit", planecarmarker, MarkerHit ) --PutCarFreeSpawn GUI HERE!!! GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[3] = guiCreateWindow(322,193,361,409,"Aviator Free Car Spawner by Robbster",false) GUIEditor_Label[3] = guiCreateLabel(102,115,117,123,"",false,GUIEditor_Window[3]) GUIEditor_Grid[3] = guiCreateGridList(42,54,277,216,false,GUIEditor_Window[3]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[3],"Airport Cars",0.2) for i = 1, 3 do guiGridListAddRow(GUIEditor_Grid[3]) end guiGridListSetItemText(GUIEditor_Grid[3],0,1,"Baggage") guiGridListSetItemText(GUIEditor_Grid[3],1,1,"Tug") guiGridListSetItemText(GUIEditor_Grid[3],2,1,"Utility Van") GUIEditor_Button[3] = guiCreateButton(40,307,296,80,"Close",false,GUIEditor_Window[1]) addEventHandler ( 'onClientGUIClick', GUIEditor_Button[3], function ( ) setCameraTarget ( localPlayer ) guiSetVisible ( GUIEditor_Window[3], false ) --removes GUI on click Exit Button showCursor ( false ) --shows cursor end ) Thank you! This is from a bigger script, i dont think you need the other part though
Castillo Posted November 15, 2012 Posted November 15, 2012 If you don't tell us what is wrong, then how can we help you fix it?
toptional Posted November 15, 2012 Author Posted November 15, 2012 Sorry the issue is The GUI Randomly comes up in a weird position upon resource start and it fails to load the script cuase of errors Errors are all about the GUI
Tomaat Posted November 15, 2012 Posted November 15, 2012 Planecarmaker = And Onclientmarkerhit, planecarmaker The P and p are different ^^
toptional Posted November 15, 2012 Author Posted November 15, 2012 Thanks Tomaat, Ive edited a few things now take a look castillo, Getting the same errors though Planecarmarker = createMarker ( 1684.59326, 1453.62866, 9.76983 , "cylinder", 2, 9, 233, 213, 105 ) function MarkerHit (hitPlayer, matchingDimension ) guiSetVisible (GUIEditor_Window[3], true ) end addEventHandler ( "onClientMarkerHit", Planecarmarker, MarkerHit ) --PutCarFreeSpawn GUI HERE!!! GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[3] = guiCreateWindow(322,193,361,409,"Aviator Free Car Spawner by Robbster",false) GUIEditor_Label[3] = guiCreateLabel(102,115,117,123,"",false,GUIEditor_Window[3]) GUIEditor_Grid[3] = guiCreateGridList(42,54,277,216,false,GUIEditor_Window[3]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[3],"Airport Cars",0.2) for i = 1, 3 do guiGridListAddRow(GUIEditor_Grid[3]) end guiGridListSetItemText(GUIEditor_Grid[3],0,1,"Baggage") guiGridListSetItemText(GUIEditor_Grid[4],1,1,"Tug") guiGridListSetItemText(GUIEditor_Grid[5],2,1,"Utility Van") GUIEditor_Button[3] = guiCreateButton(40,307,296,80,"Close",false,GUIEditor_Window[1]) addEventHandler ( 'onClientGUIClick', GUIEditor_Button[3], function ( ) setCameraTarget ( localPlayer ) guiSetVisible ( GUIEditor_Window[3], false ) --removes GUI on click Exit Button showCursor ( false ) --shows cursor end )
Castillo Posted November 15, 2012 Posted November 15, 2012 Add 'false, false' at the end of every guiGridListSetItemText.
toptional Posted November 15, 2012 Author Posted November 15, 2012 GUI Shows up on resource start not on hit Marker....
Anderl Posted November 15, 2012 Posted November 15, 2012 Because you didn't hide it on resource start.
toptional Posted November 15, 2012 Author Posted November 15, 2012 Because you didn't hide it on resource start. Ive changed alot, Thanks to Castilo now look at this: viewtopic.php?f=91&t=50237
toptional Posted November 16, 2012 Author Posted November 16, 2012 /bump Ok guys here is what i got so far still getting big errors please take a look Bassically it appears when i hit the marker but only some of it appears not that stuff that says Utility Van and the Tug bit. Also When i click close it closes the GUI but not the button it self thanks for helping me ! Client.lua Planecarmarker = createMarker ( 1684.59326, 1453.62866, 9.76983 , "cylinder", 2, 9, 233, 213, 105 ) function MarkerHit2 ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer ) then guiSetVisible ( GUIEditor_Window[3], true ) end end addEventHandler ( "onClientMarkerHit", Planecarmarker, MarkerHit2 ) --PutCarFreeSpawn GUI HERE!!! GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Window[3] = guiCreateWindow(322,193,361,409,"Aviator Free Car Spawner by Robbster",false) guiSetVisible ( GUIEditor_Window[3], false ) GUIEditor_Label[3] = guiCreateLabel(102,115,117,123,"",false,GUIEditor_Window[3]) GUIEditor_Grid[3] = guiCreateGridList(42,54,277,216,false,GUIEditor_Window[3]) guiGridListAddColumn(GUIEditor_Grid[3],"Airport Cars",0.9) end ) for i = 1, 3 do guiGridListAddRow(GUIEditor_Grid[3]) end guiGridListSetItemText(GUIEditor_Grid[3],0,1,"Baggage",false,false) guiGridListSetItemText(GUIEditor_Grid[3],1,1,"Tug",false,false) guiGridListSetItemText(GUIEditor_Grid[3],2,1,"Utility Van",false,false) GUIEditor_Button[3] = guiCreateButton(40,307,296,80,"Close",false,GUIEditor_Window[3]) addEventHandler ( 'onClientGUIClick', GUIEditor_Button[3], function ( ) setCameraTarget ( localPlayer ) guiSetVisible ( GUIEditor_Window[3], false ) --removes GUI on click Exit Button showCursor ( false ) --removing the cursor end )
toptional Posted November 16, 2012 Author Posted November 16, 2012 Sorry for this Double Posting ! But can Anyone help?
Castillo Posted November 16, 2012 Posted November 16, 2012 Planecarmarker = createMarker ( 1684.59326, 1453.62866, 9.76983 , "cylinder", 2, 9, 233, 213, 105 ) function MarkerHit2 ( hitPlayer, matchingDimension ) if ( hitPlayer == localPlayer ) then guiSetVisible ( GUIEditor_Window[3], true ) end end addEventHandler ( "onClientMarkerHit", Planecarmarker, MarkerHit2 ) --PutCarFreeSpawn GUI HERE!!! GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Window[3] = guiCreateWindow(322,193,361,409,"Aviator Free Car Spawner by Robbster",false) guiSetVisible ( GUIEditor_Window[3], false ) GUIEditor_Label[3] = guiCreateLabel(102,115,117,123,"",false,GUIEditor_Window[3]) GUIEditor_Grid[3] = guiCreateGridList(42,54,277,216,false,GUIEditor_Window[3]) guiGridListAddColumn(GUIEditor_Grid[3],"Airport Cars",0.9) for i = 1, 3 do guiGridListAddRow(GUIEditor_Grid[3]) end guiGridListSetItemText(GUIEditor_Grid[3],0,1,"Baggage",false,false) guiGridListSetItemText(GUIEditor_Grid[3],1,1,"Tug",false,false) guiGridListSetItemText(GUIEditor_Grid[3],2,1,"Utility Van",false,false) GUIEditor_Button[3] = guiCreateButton(40,307,296,80,"Close",false,GUIEditor_Window[3]) addEventHandler ( 'onClientGUIClick', GUIEditor_Button[3], onButtonClick, false ) end ) function onButtonClick ( ) setCameraTarget ( localPlayer ) guiSetVisible ( GUIEditor_Window[3], false ) --removes GUI on click Exit Button showCursor ( false ) --removing the cursor end
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