AboFaisal Posted December 20, 2012 Share Posted December 20, 2012 السلام عليكم ورحمه الله وبركاتة’’ الكود الأول : محد يقدر يفتح النافذه إلا الأدمنيين تفضلو عدلو على الكـود : addCommandHandler("Panel", function() guiSetVisible(Window,true) showCursor(true) end) الكـود الثـاني : أبي إذا فتحت نافذه تمشي من اليمين أو على الشمال وببطئ وسللآآمتكــم , Link to comment
abu5lf Posted December 20, 2012 Share Posted December 20, 2012 isObjectInACLGroup - عشان تشوف هو ادمن او لا guiSetPosition - عشان تحريك نافذة من مكان الى مكان Link to comment
AboFaisal Posted December 20, 2012 Author Share Posted December 20, 2012 isObjectInACLGroup - عشان تشوف هو ادمن او لاguiSetPosition - عشان تحريك نافذة من مكان الى مكان نقدر نتواصل أرجوكـ ووضح أكثر لآهنت يالغـآلي Link to comment
Baseplate Posted December 20, 2012 Share Posted December 20, 2012 (edited) Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI", root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end addCommandHandler("Panel", serverGUI) Edited December 20, 2012 by Guest Link to comment
AboFaisal Posted December 20, 2012 Author Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI, root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end addCommandHandler("Panel", serverGUI) بجرب وبرد لك خبر Link to comment
abu5lf Posted December 20, 2012 Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI, root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end addCommandHandler("Panel", serverGUI) Wrong! Link to comment
AboFaisal Posted December 20, 2012 Author Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI, root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end addCommandHandler("Panel", serverGUI) مايشتغل =/ Link to comment
|Mr|-Talal07-| Posted December 20, 2012 Share Posted December 20, 2012 جرب ذا -- Client Side addEvent("onShowWindow",true) addEventHandler("onShowWindow",root, function () guiSetVisible(Window,true) showCursor(true) end ) -- Server Side addCommandHandler("Panel", function (player) local acc = getPlayerAccount(player) if ( not isGuestAccount(acc) ) then if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup("Admin")) then triggerClientEvent(player,"onShowWindow",player) else outputChatBox("You Are Not Admin") end else outputChatBox("You Don't Have Account") end end ) Link to comment
AboFaisal Posted December 20, 2012 Author Share Posted December 20, 2012 جرب ذا -- Client Side addEvent("onShowWindow",true) addEventHandler("onShowWindow",root, function () guiSetVisible(Window,true) showCursor(true) end ) -- Server Side addCommandHandler("Panel", function (player) local acc = getPlayerAccount(player) if ( not isGuestAccount(acc) ) then if isObjectInACLGroup("user." .. getAccountName(acc),aclGetGroup("Admin")) then triggerClientEvent(player,"onShowWindow",player) else outputChatBox("You Are Not Admin") end else outputChatBox("You Don't Have Account") end end ) مآيشتغل Link to comment
iPrestege Posted December 20, 2012 Share Posted December 20, 2012 (edited) Samer = يتكلم عربي بـس مآعندهـ كيبورد Edited December 20, 2012 by Guest Link to comment
AboFaisal Posted December 20, 2012 Author Share Posted December 20, 2012 @ Client Side addEvent("onShowWindow",true) addEventHandler("onShowWindow",root, function () guiSetVisible(Window,true) showCursor(true) end ) @ Server Side addCommandHandler("Panel", function (player) if (getElementType(player) == "player") then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup( "Admin")) then triggerClientEvent(player,"onShowWindow",player) else outputChatBox("You Are Not Admin") end else outputChatBox("You Don't Have Account") end end ) نفس الشي موب شغآل Link to comment
AboFaisal Posted December 20, 2012 Author Share Posted December 20, 2012 هل من مجيب ؟؟؟ Link to comment
Baseplate Posted December 20, 2012 Share Posted December 20, 2012 Sorry for using English cause I don't have an Arabic keyboard, maybe someone could explain. Show us your entire code. Link to comment
iPrestege Posted December 20, 2012 Share Posted December 20, 2012 Sorry for using English cause I don't have an Arabic keyboard, maybe someone could explain.Show us your entire code. الترجمة : اسف على استخدام الانجليزي وذلك بسبب اني لآ آملك العربية في الكيبورد ربما شخص ما سيقوم بالشرح لك اطرح السكربت كامل هنا يبيك تطرح السكربت كامل Link to comment
abu5lf Posted December 20, 2012 Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI", root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end addCommandHandler("Panel", serverGUI) عندك ايند ناقصة في الكود الثاني Link to comment
Baseplate Posted December 20, 2012 Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI", root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end end addCommandHandler("Panel", serverGUI) Link to comment
AhmadQTR Posted December 20, 2012 Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI", root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end end addCommandHandler("Panel", serverGUI) --Client function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI", root, clientGUI) Link to comment
3NAD Posted December 20, 2012 Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI", root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end end addCommandHandler("Panel", serverGUI) triggerClientEvent("showGUI", getRootElement()) getRootElement() لو تستخدم هذا اللوحة راح تفك عند الكل =/ Link to comment
Tete omar Posted December 20, 2012 Share Posted December 20, 2012 Client: function clientGUI() guiSetVisible(Window,true) showCursor(true) end addEvent("showGUI", true) addEventHandler("showGUI", root, showGUI) Server: function serverGUI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent("showGUI", getRootElement()) end end addCommandHandler("Panel", serverGUI) triggerClientEvent("showGUI", getRootElement()) getRootElement() لو تستخدم هذا اللوحة راح تفك عند الكل =/ bool triggerClientEvent ( [element sendTo=getRootElement()], string name, element theElement, [arguments...] ) فـ أفضل triggerClientEvent(root, "showGUI", root) ثانياً ليش تتعب نفسك في كتابة وظيفة مع انك يمديك تختصرها في كلمة وحدة؟ root = getRootElement() Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now