Jump to content

طلب كود


Recommended Posts

Posted

السلام عليكم

كيفكم شباب ؟ عسآآكم الله بخير

بدى كود يخلى اللوحة تفتح لقروب اسل معين

يعنى ما تفتح الا لقروب

Police Manager

Posted
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Police Manager" ) ) then 

ممكن تكميل للكود ؟

Posted

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

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

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

Posted

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

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

Posted

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) 
Posted
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

Posted

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

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

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

Posted
مشكوور اخوى بس الكرسور ما يروح لما اقفل اللوحة من زر 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 
 ) 

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