السلام عليكم
انا سويت لوحه قريد ليست بها سكنات
ولكن عند الضغط مرتين على القريد ما يعطينى السكن
الكود
List = {
{ 'skin',41},
{ 'skin2',45 },
{ 'skin3',54},
{ 'skin4',91 },
}
for i, c in ipairs ( List ) do
local aRow = guiGridListAddRow ( GridList[1] )
guiGridListSetItemText ( GridList[1], aRow, 1, ''..i..'', false, false )
guiGridListSetItemText ( GridList[1], aRow, 2, c[1], false, false )
guiGridListSetItemColor(GridList[1], aRow, 2, 255, 255, 0, 255)
guiGridListSetItemColor(GridList[1], aRow, 1, 0, 255, 255, 255)
end
addEventHandler("onClientDoubleGUIClick", root ,
function()
if source == GridList[1] then
ID = guiGridListGetItemText ( GridList[1], guiGridListGetSelectedItem ( GridList[1] ), 3 )
triggerServerEvent("skin", localPlayer , S ,ID)
end
end )
addEvent ("skin" , true)
addEventHandler("skin",root,
function(ID)
setPedSkin (source, ID )
end
)