صراحه اشوفك تعبت وحاولت وبكذا بعطيك كود جاهز
addEvent( " Server;CreateTeam", true )
addEventHandler ( " Server;CreateTeam", root,
function ( text, team )
if text == "Delete" then
local team = getTeamFromName ( name )
if ( getTeamFromName ( name ) ) then
destroyElement ( team )
end
end
end
)
-- كلنت
addEventHandler ( 'onClientGUIClick' ,root,
function ( )
if source == deletem then
local team = guiGridListGetItemText ( gridlist2, guiGridListGetSelectedItem ( gridlist2 ), 1 )
if guiGridListGetSelectedItem ( gridlist2 ) ~= "" then
triggerServerEvent( "Server;CreateTeam",localPlayer,"Delete",team )
end
end
end
)