GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(269,161,259,296,"",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,26,241,250,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
guiGridListAddColumn(GUIEditor_Grid[1],"skin",0.2) 
local rows = {} 
rows.skin1 = guiGridListAddRow(GUIEditor_Grid[1]) 
rows.skin2 = guiGridListAddRow(GUIEditor_Grid[1]) 
guiGridListSetItemText(GUIEditor_Grid[1],rows.skin1,1,"Skin 1",false,false) 
guiGridListSetItemText(GUIEditor_Grid[1],rows.skin2,1,"Skin 2",false,false) 
  
  
  
local skins = { ["Skin 1"] = 1, ["Skin 2"] = 2 } 
  
addEventHandler("onClientGUIClick", GUIEditor_Grid[1], 
    function() 
        for i, v in pairs( rows ) do 
           if( guiGridListGetSelectedItem(source) == v )thenlocal itemName = guiGridListGetItemText(GUIEditor_Grid[1], guiGridListGetSelectedItem(source), 1) 
                if(skins[ itemName ])then 
                    triggerServerEvent("settingModel", localPlayer, skins[ itemName ]) 
                end 
            end 
        end 
    end 
) 
  
local marker = createMarker ( 0, 0, 2, "cylinder", 1.5, 255, 255, 0, 170 ) 
  
addEventHandler("onClientMarkerHit", marker, 
    function(hitElement) 
        if( hitElement == localPlayer )then 
            showCursor(true) 
            guiSetVisible( GUIEditor_Window[1], true ) 
        end 
    end 
)