Jump to content

طلب كود بسيط ~


-MF[7]6

Recommended Posts

# لو تبحث تلقى طلبكـ .

# اللوحة تفتح لسيريال محدد

ZA7F = { 
["Your Serial"] = true, 
} 
  
local Key = "F2" 
local WindowName = Your Window  
  
bindKey(Key,"down",function ( ) 
        local PlayerSerial = getPlayerSerial(localPlayer) 
        if ( ZA7F[PlayerSerial] ) then   
            guiSetVisible( WindowName, not guiGetVisible ( WindowName ) ) ; 
            showCursor ( guiGetVisible ( WindowName ) ); 
        end; 
end ); 

اللوحة لقروب محدد .

Client Side !

local Key = "F3" 
local Window = Name Window 
  
function ZA7F() 
    triggerServerEvent("AdminOpen",localPlayer) 
end 
bindKey(Key,"down",ZA7F) 
  
addEvent("Open",true) 
addEventHandler("Open",root, 
    function () 
          if ( guiGetVisible(Window) == true ) then 
          guiSetVisible(Window,false) 
          showCursor(false) 
    else 
          guiSetVisible(Window,true) 
          showCursor(true) 
        end 
    end 
) 

Server Side !

addEvent("AdminOpen",true) 
addEventHandler("AdminOpen",root, 
    function () 
      local Group = "Group Name" 
      if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Group)) then 
            triggerClientEvent(source,"Open",source) 
        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...