كلنت :
addEventHandler('onClientGUIClick',resourceRoot, function ( )
if ( source == NameButton ) then
if ( guiGetText(NameEdit) ~= '' ) then
triggerServerEvent('KickAll',localPlayer,guiGetText(NameEdit))
end
end
end
)
سيرفر :
addEvent('KickAll',true)
addEventHandler('KickAll',root, function ( resaon )
for i,v in ipairs ( getElementsByType('player') ) do
kickPlayer(v,resaon)
end
end
)