GUIEditor_Window = {}
GUIEditor_Grid = {}
GUIEditor_Window[1] = guiCreateWindow(250,128,321,319,"",false)
guiSetVisible( GUIEditor_Window[1], false )
GUIEditor_Grid[1] = guiCreateGridList( 9,23,303,283, false, GUIEditor_Window[1] )
guiGridListSetSelectionMode( GUIEditor_Grid[1], 2 )
guiGridListAddColumn( GUIEditor_Grid[1], 'Skins', 0.80 )
aSkins =
{
--[[{ 'Name Skin', ID Skin };]]
{ 'Skin`1', 46 };
{ 'Skin`2', 47 };
{ 'Skin`3', 48 };
}
for _, aSkin in ipairs( aSkins )do
local gRow = guiGridListAddRow( GUIEditor_Grid[1] )
guiGridListSetItemText( GUIEditor_Grid[1],
gRow,
1, tostring( aSkin[ 1 ] ), false, false
)
guiGridListSetItemData( GUIEditor_Grid[1],
gRow,
1, tostring( aSkin[ 2 ] )
)
end
addEventHandler( 'onClientGUIDoubleClick', GUIEditor_Grid[1],
function( )
local iRow, iCol = guiGridListGetSelectedItem( GUIEditor_Grid[1] )
if( iRow and iCol and iRow ~= -1 and iCol ~= -1 )then
local ID_Skin = tonumber( guiGridListGetItemData( GUIEditor_Grid[1], iRow, 1 ) )
if ID_Skin ~= '' then
setElementModel( localPlayer, ID_Skin )
guiSetVisible( GUIEditor_Window[1], false )
showCursor( false )
end
end
end, false
)
Marker1 = createMarker( 1467, -1012, 28, 'arrow', 2.5, 0, 0, 255, 150 )
addEventHandler( 'onClientMarkerHit', Marker1,
function( hitPlayer )
if hitPlayer == localPlayer then
guiSetVisible( GUIEditor_Window[1], true )
showCursor( true )
end
end
)