Jump to content

طلب كود


Recommended Posts

المود يفتح من حرف m

كود فتح اللوحة انا مسويه للجميع بس عشان كنت اعدل فى اللوحة

  bindKey("m","down", function ( ) 
 guiSetVisible(wnd, not guiGetVisible(wnd)) 
 showCursor(guiGetVisible(wnd)) 
 end) 

Link to comment

-- client 
bindKey ("m","down", 
function () 
triggerServerEvent ("check",localPlayer) 
end) 
addEvent ("openWND",true) 
addEventHandler ("openWND",root, 
function () 
guiSetVisible (wnd,not guiGetVisible (wnd)) 
showCursor (guiGetVisible (wnd)) 
guiSetInputEnabled (guiGetVisible(wnd)) 
end 
) 

-- server 
addEvent ("check",true) 
addEventHandler ("check",root, 
function () 
local acc = getAccountName (getPlayerAccount(source)) 
if not aclGetGroup ("Police Manager") then return outputChatBox ("cannot find 'Police Manager' acl group",source,255,5,5) end 
if isObjectInACLGroup ("user."..acc,aclGetGroup ("Police Manager")) then 
triggerClientEvent (source,"openWND",source) 
else return 
outputChatBox ("You're not police manager",source,255,5,5) 
end 
end) 

و ممكن تشوف الرسايل الخاصة؟

Link to comment

bindKey ("m","down", 
function () 
triggerServerEvent ("check",localPlayer) 
end) 
addEvent ("openWND",true) 
addEventHandler ("openWND",root, 
function () 
guiSetVisible (wnd,not guiGetVisible (wnd)) 
showCursor (guiGetVisible (wnd)) 
guiSetInputEnabled (guiGetVisible(wnd)) 
end 
) 

addEvent ("check",true) 
addEventHandler ("check",root, 
    function () 
        local acc = getAccountName (getPlayerAccount(source)) 
        if not aclGetGroup ("Police Manager") then return outputChatBox ("cannot find 'Police Manager' acl group",source,255,5,5) end 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Police Manger")) then 
            triggerClientEvent (source,"openWND",source) 
            else return 
outputChatBox ("You're not police manager",source,255,5,5) 
end 
end) 
Link to comment
bindKey ("m","down", 
function () 
triggerServerEvent ("check",localPlayer) 
end) 
addEvent ("openWND",true) 
addEventHandler ("openWND",root, 
function () 
guiSetVisible (wnd,not guiGetVisible (wnd)) 
showCursor (guiGetVisible (wnd)) 
guiSetInputEnabled (guiGetVisible(wnd)) 
end 
) 

addEvent ("check",true) 
addEventHandler ("check",root, 
    function () 
        local acc = getAccountName (getPlayerAccount(source)) 
        if not aclGetGroup ("Police Manager") then return outputChatBox ("cannot find 'Police Manager' acl group",source,255,5,5) end 
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Police Manger")) then 
            triggerClientEvent (source,"openWND",source) 
            else return 
outputChatBox ("You're not police manager",source,255,5,5) 
end 
end) 

نفسي اعرف ايه هي فايدة ردك دة ؟

كوبي و بيست بشكل مباشر و انت اصلاً مش فاهم ايه اللي انت بتعمله؟

و دي مش اول مرة كررتها في مواضيع كتير :-s

Link to comment

مشكوور اخوى بس الكرسور ما يروح لما اقفل اللوحة من زر Close

و انا حاطت كود الكرسور مع زر قفل اللوحة

addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == Close ) then 
guiSetVisible(wnd,false) 
showCursor(false) 
end 
 end 
 ) 

Link to comment
مشكوور اخوى بس الكرسور ما يروح لما اقفل اللوحة من زر Close

و انا حاطت كود الكرسور مع زر قفل اللوحة

addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == Close ) then 
guiSetVisible(wnd,false) 
showCursor(false) 
end 
 end 
 ) 

addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == Close ) then 
guiSetVisible(wnd,false) 
showCursor(false) 
guiSetInputEnabled (false) 
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...