Jump to content

GUI help!


toptional

Recommended Posts

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

Link to comment

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 
) 
  

Link to comment

/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 :D!

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 
    ) 
  

Link to comment
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 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...