Not Working, I've also added a button
addEventHandler("onClientResourceStart", resourceRoot,
function()
window = guiCreateWindow(266, 121, 184, 287, "Skin Panel", false)
guiWindowSetSizable(window, false)
gridlist = guiCreateGridList(9, 20, 165, 257, false, window)
column = guiGridListAddColumn(gridlist, "Skins", 0.9)
for i = 1, 1 do
guiGridListAddRow(window)
end
guiGridListSetItemText(gridlist, 0, 1, "Punk", false, false)
button = guiCreateButton(23, 205, 121, 42, "SELECT", false, gridlist)
guiSetVisible(window, false)
end
)
function showTheGui()
local v = guiGetVisible( window )
guiSetVisible(window, not v )
showCursor(v)
end
addCommandHandler("opengui", showTheGui)
bindKey("F1", "down", showTheGui)
function setTheSkin()
if ( source == button ) then
local row = guiGridListGetSelectedItem( gridlist )
local name = guiGridListGetItemText( window, row, column)
if name == "Punk" then
setElementModel(localPlayer, 181)
end
end
end
addEventHandler("onClientGUIClick", root, setTheSkin)