السلام عليكم
الحين انا معي كود لمبرمج يبحث في قريد ليست لكن يبحث في جداول
function refreshShort()
guiGridListClear(System_grid)
for i, GR in ipairs(Copy_List) do
local row = guiGridListAddRow(System_grid)
guiGridListSetItemText(System_grid, row, 1, GR[1], false, false)
guiGridListSetItemColor(System_grid, row, 1, math.random(1, 255), math.random(2, 255), math.random(3, 255))
end
end
addEventHandler('onClientGUIChanged', resourceRoot, function()
if source == System_Box then
local textVar = guiGetText(System_Box)
if textVar == '' then
refreshShort()
else
guiGridListClear(System_grid)
for k, v in ipairs(Copy_List) do
if string.find(v[1]:upper(), textVar:upper()) then
local row = guiGridListAddRow(System_grid)
guiGridListSetItemText(System_grid, row, 1, v[1], false, false);
guiGridListSetItemColor(System_grid, row, 1, math.random(1, 255), math.random(2, 255), math.random(3, 255))
end
end
end
end
end)
دا لازم القريد ليست يكون فيه جداول
الحين انا سويت قريد ليست يجي فيه لوقات كلام واشياء كتير ابيه يبحث فيهم
وهاددا الكود حق وضع اللوق في القريد ليست
addEvent(":1", true)
addEventHandler(:1", root,
function(LogHo)
guiGridListClear(Wnd2.gridlist[1])
for Key, Value in ipairs(LogHo) do
local Row = guiGridListInsertRowAfter(Wnd2.gridlist[1], -1)
guiGridListSetItemText(Wnd2.gridlist[1], Row, 1,Value.Time.." "..Value.Action, false, false)
guiGridListSetItemColor(Wnd2.gridlist[1], Row, 1, Value.R, Value.G, Value.B)
end
end
)