Jump to content

x[مشكلة]x تفتح برتبة


Recommended Posts

شباب السلام عليكم 

المشكلة انه يفتح حتى برتبة الزائر

الكود

--server die
addEvent("check",true)
addEventHandler("check",root,function( )
    local account = getAccountName(getPlayerAccount(source))
    if ( isObjectInACLGroup("user." ..account, aclGetGroup("Console")) ) then
      triggerClientEvent(source, "openwin", source)
      end
    end)


client --
  function a ()
if source == window then
triggerServerEvent("check",getLocalPlayer())
end
end
addEventHandler("onClientGUIClick",root,a)
      function OpenWin() 
    if guiGetVisible ( window ) then   
       guiSetVisible ( window, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
	   guiSetVisible(aI[1],false)
guiSetVisible(aI[2],false)
guiSetVisible(aI[3],false)
guiSetVisible(aI[4],false)
guiSetVisible(aI[5],false)
    else 
        guiSetVisible ( window, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
		guiSetVisible(aI[1],true)
         guiSetVisible(aI[2],true)
         guiSetVisible(aI[3],true)
         guiSetVisible(aI[4],true)
		 guiSetVisible(aI[5],true)

    end 
end 
bindKey("F5", "down", OpenWin) 
addEvent("openwin",true)
addEventHandler("openwin",root,function( )
guiSetEnabled(window,true)
showCursor(true)
end);

طرحت الكود الي فيه مشكلة بس 

Edited by yasin0
  • Like 1
Link to comment

جرب

Server:

addEvent("check",true)
addEventHandler("check",root,function( )
		local acc = getPlayerAccount(source)
    		if not isGuestAccount ( acc ) then
			if isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then
      triggerClientEvent(source, "openwin", source)
      end
      end
    end)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...