نفس المشكله
صار سطر 37
GUIEditor = {
gridlist = {},
window = {},
button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(273, 203, 232, 263, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
GUIEditor.gridlist[1] = guiCreateGridList(9, 26, 213, 199, false, GUIEditor.window[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "أختر أسم ", 0.9)
GUIEditor.button[1] = guiCreateButton(75, 232, 74, 21, "أختيــار", false, GUIEditor.window[1])
for i = 1, 5 do
guiGridListAddRow(GUIEditor.gridlist[1])
end
guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "نواف", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "عمر", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "عائشة", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "فاطمة", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "محمد", false, false)
addEventHandler("onClientGUIClick",root,
function ()
if source == GUIEditor.button[1] then
local grid = guiGridListGetSelectedItem(GUIEditor.gridlist[1])
local getgrid = guiGridListGetItemText(GUIEditor.gridlist[1], grid, Column)
if not grid or not getgrid then
return
end
if getgrid == "" then
return
end
triggerServerEvent("setaname", localPlayer, getgrid)
end
end)