Client Side !
addEventHandler( "onClientGUIClick", GUIEditor_Button[2], function ( )
local row, col = guiGridListGetSelectedItem(GUIEditor_Grid[1])
if ( row and col and row ~= -1 and col ~= -1 ) then
triggerServerEvent("RemoveRow", localPlayer, carName, row)
end
end
)
addEvent ( "DeleteRow" , true)
addEventHandler ( "DeleteRow", root, function ( carName )
if ( carName and carName ~= nil ) then
guiGridListRemoveRow ( GUIEditor_Grid[1], carName )
end
end
)
Server Side !
addEvent("RemoveRow", true)
addEventHandler("RemoveRow", root, function(carName, row)
if executeSQLQuery("DELETE FROM `SQL_Data` WHERE `carName` = ? ", tostring(carName) ) then
triggerClientEvent(root, "DeleteRow", root, tostring( row ))
end
end
)
+ . وتأكد كل شي صحيح carName تأكد انك مسوي قاعدة البيانات , وفي رو بـ ذا الاسم