جرب
addEventHandler("onClientGUIClick",root,
if source == GUIEditor.button[1] then
local sel = guiGridListGetSelectedItem(grid) --جلب من القريت لست
local aSoking = guiGridListGetItemText(grid,sel,1) -- احظار مكان الكلمة اذا كان في قصمين
if ( sel ~= -1 ) then -- يتحقق اذا كان محدد
triggerServerEvent("Remove",localPlayer,aSoking)
end
end
)
-- سيرفر
executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aSokingX2 ( aRows )' )
addEvent('Event', true )
addEventHandler('Event' , getRootElement ( ) ,
function ( aText )
executeSQLQuery( 'INSERT INTO aSokingX2 (aRows) VALUES ( ? )' , aText )
triggerClientEvent( getRootElement ( ) , 'addText', getRootElement ( ) , aText )
end )
addEvent('EventS', true )
addEventHandler('EventS' , getRootElement ( ) ,
function ( )
Value = executeSQLQuery( 'SELECT * FROM aSokingX2' )
if ( #Value ~= 0 ) then
triggerClientEvent ( source , 'EventT2' , source , Value )
end
end )
addEvent("Remove",true)
addEventHandler("Remove",root, function ( aSoking )
executeSQLQuery("DELETE FROM aSokingX2 WHERE aRows=?",aSoking)
outputChatBox("تم الازألة بنجآح",source,0,188,205,true)
end
)