Jump to content

فكشنات جوي اديتور


Recommended Posts

  bindKey ( player, "F1", "down", GUIEditor.window[1] ) 
    triggerServerEvent ( "onGreeting", getLocalPlayer(), "Hello World!" )  
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) 
  

Link to comment
  bindKey ( player, "F1", "down", GUIEditor.window[1] ) 
    triggerServerEvent ( "onGreeting", getLocalPlayer(), "Hello World!" )  
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) 
  

Copy paste :

-- Client Side --

bindKey('F1','down', 
    function (  ) 
        triggerServerEvent ('aCheckGroup',localPlayer) 
    end 
) 
  
addEvent('aCheckDone',true) 
addEventHandler('aCheckDone',root, 
    function (  state  ) 
        if state and not guiGetVisible ( aWindow ) then 
            guiSetVisible ( GUIEditor.window[1],state ) 
    end 
end 
) 

-- Server Side --

addEvent('aCheckGroup',true) 
addEventHandler('aCheckGroup',root, 
    function (  ) 
      if isGuestAccount ( getPlayerAccount ( client ) ) then return false end 
      local aPlayerAccount = getAccountName ( getPlayerAccount ( client ) )  
            if isObjectInACLGroup ('user.'..aPlayerAccount, aclGetGroup ( 'Admin' )         ) then  
                triggerClientEvent ( client,'aCheckDone',client,true ) 
            else 
                outputChatBox('Access denied',client,255,0,0) 
        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...