Client Side
addEvent ( "showWindow", true )
addEventHandler ( "showWindow", root, function ( )
guiSetVisible( element, not guiGetVisible ( element ) )
showCursor ( guiGetVisible( element ) )
end )
Server Side
local GroupName = "Admin" --- اسم القروب .
addCommandHandler ( "Window", function ( player )
if ( isGuestAccount( getPlayerAccount( player ) ) ) then return end
if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( GroupName ) ) ) then
triggerClientEvent ( player, "showWindow", player )
end
end )