Jump to content

مسااعده بـ اسرع وقت


Recommended Posts

السلام عليكم

شباب سويت كذا وماضبط ووش فيه

function OpenWin ( player ) 
    local accName = getAccountName(getPlayerAccount(player)) 
    if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then 
        triggerClientEvent  ( player,'ShowGui',player ) 
    else 
        outputChatBox ( "فقط الكونسل ", player, 20,230,249, true ) 
    end 
end 
bindKey("F1", "down", OpenWin) 

Link to comment
addEventHandler('onPlayerJoin',root, 
    function (      ) 
        bindKey ( source,'F1','down',aHandler ) 
    end 
) 
  
addEventHandler('onResourceStart',resourceRoot, 
    function (      ) 
        for index,player in ipairs ( getElementsByType ( 'player' ) ) do 
            bindKey ( player,'F1','down',aHandler ) 
    end 
end 
) 
function aHandler ( player ) 
    local accName = getAccountName(getPlayerAccount(player)) 
    if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then 
        triggerClientEvent  ( player,'ShowGui',player ) 
    else 
        outputChatBox ( "فقط الكونسل ", player, 20,230,249, true ) 
    end 
end 
  

Link to comment
  
Server Side .. # 
function OpenWin ( player ) 
        local accName = getAccountName(getPlayerAccount(player)) 
        if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then 
            triggerClientEvent  ( player,'ShowGui',player ) 
        else 
            outputChatBox ( "فقط الكونسل ", player, 20,230,249, true ) 
        end 
end 
  

  
Client Side .. # 
addEvent("ShowGui",true) 
addEventHandler("ShowGui",root, 
function () 
bindKey("YourKey","down",open) 
end 
) 
open = function() 
guiSetVisible(Window,not guiGetVisible(Window)) showCursor(guiGetVisible(Window)) 
end 
) 
  

التعديل Window الى اسم نافذتك

YourKey = الى الزر اللي تبيه يفتح النافذة xD

تقدر تقولي وش اللي بيشغل السيرفر ؟ و تقولي من وين جبت

player = ?

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...