Jump to content

طلب فنكشات


Recommended Posts

addEventHandler ( 'onClientGUIClick', resourceRoot, 
function ( ) 
    if ( source == button ) then --- button الزر 
    guiSetVisible ( wnd, true ) -- wnd النافذة 
     end 
  end 
) 

اذا لوحة من مود ثاني لازم تسوي اكسبورت صح ؟

كيف يعني من مود ثاني

ذا الكود لازم بنفس المود

اذا نافذة ثانية ماجربت ..

+

صاحب الموضوع

--Client

function toggleGUI() 
    if guiGetVisible(wnd) == true then 
        guiSetVisible(wnd,false) 
        showCursor(false) 
    else 
        guiSetVisible(wnd,true) 
        showCursor(true) 
    end 
end 
addEvent("toggleGUI",true) 
addEventHandler("toggleGUI",root,toggleGUI) 

---Server

addEventHandler("onPlayerJoin",root, 
function () 
    bindKey(source,"F3","down",showGUI) 
end) 
  
addEventHandler("onResourceStart",resourceRoot, 
function () 
    for index, player in ipairs(getElementsByType("player")) do 
        bindKey(player,"F3","down",showGUI) 
    end 
end) 
  
function showGUI(thePlayer) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Admin")) then 
        triggerClientEvent(thePlayer,"toggleGUI",thePlayer) 
    else 
    outputChatBox(" You Dont Have Access to This Panel",thePlayer,255,0,0) 
    end 
end 

اتوقع كود كتابة امر يكون سهل عليك .. .

Link to comment
انت معطيني مع زر ابيها مع كتابت امر ب اف 8

تفضل طال عمرك ,

addCommandHandler ( "الكلمة", function ( ) 
guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) 
showCursor ( not isCursorShowing ( ) ) 
  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...