xAymanixx Posted July 18, 2014 Share Posted July 18, 2014 السلام وعليكم شبااب ان شاء الله بخير ابي كود اسويه لي لوحة تطلع للادمنية و بس يعني لي ياخذ رتبة لما مثلا يضغط ف2 تفتح له لوحة و لي ماعندو رتبة ما تفتح له اللوحة Link to comment
Max+ Posted July 18, 2014 Share Posted July 18, 2014 ---ClientSide function toggleGUI() if guiGetVisible(Name) == true then guiSetVisible(Name,false) showCursor(false) else guiSetVisible(Name,true) showCursor(true) end end addEvent("toggleGUI",true) addEventHandler("toggleGUI",root,toggleGUI) ---ServerSide 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 Name -- غيرها لاسم النافذة اللي عندك F3 --- ذا زر الفتح . . Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 بيقولي : You Dont Have Access to This Panel بس اللوحة تفتح ولو ما معي رتبة مع اني مسوي كل شي صحيح Link to comment
-#Saimon Posted July 18, 2014 Share Posted July 18, 2014 هل ضفت المود لقروب ادمن ؟ resource.Name Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 شوف اذا انت مو بقروب Admin غير كلمة Admin إلى القروب اللي أنت فيه if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("[size=8]Admin[/size]")) then Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 المشكلة الان انا لوحة تفتح عندي بدون ما اضغط على رمز لي مسوي انا و ما تكسر تبقا معلقة GUIEditor_Button = {} a = guiCreateWindow(175,97,529,430,".....",false) guiSetAlpha(a,1) a = guiCreateMemo(10,22,510,297,"......",false,a) a = guiCreateMemo(11,321,507,69,".........",false,a) a = guiCreateButton(12,392,493,29,".......",false,a) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"",false) guiSetVisible (a, false) function OpenWin() if guiGetVisible ( a ) then guiSetVisible ( a, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( a, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F7", "down", OpenWin) ممكن مساعدة Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 كلنت a = guiCreateWindow(175,97,529,430,".....",false) memo = guiCreateMemo(10,22,510,297,"......",false,a) button = guiCreateButton(12,392,493,29,".......",false,a) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"...",false) guiSetVisible (a, false) function toggleGUI() if guiGetVisible(Name) == true then guiSetVisible(Name,false) showCursor(false) else guiSetVisible(Name,true) showCursor(true) end end addEvent("toggleGUI",true) addEventHandler("toggleGUI",root,toggleGUI) سيرفر addEventHandler("onPlayerJoin",root, function () bindKey(source,"F7","down",showGUI) end) addEventHandler("onResourceStart",resourceRoot, function () for index, player in ipairs(getElementsByType("player")) do bindKey(player,"F7","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
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 #تم التحديث سويت نفس الشي اللوحة دائما مفتوحة Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 آسف نسيت أعدل شي جرب ذا كلنت window = guiCreateWindow(175,97,529,430,".....",false) guiWindowSetSizable(window, false) memo = guiCreateMemo(10,22,510,297,"......",false,window) button = guiCreateButton(12,392,493,29,".......",false,window) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"...",false, window) guiSetVisible (window, false) function toggleGUI() if guiGetVisible (window ) then guiSetVisible(window,false) showCursor(false) else guiSetVisible(window,true) showCursor(true) end end addEvent("toggleGUI",true) addEventHandler("toggleGUI",root,toggleGUI) السيرفر نفسه اللي أول Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 آسف نسيت أعدل شيجرب ذا كلنت window = guiCreateWindow(175,97,529,430,".....",false) guiWindowSetSizable(window, false) memo = guiCreateMemo(10,22,510,297,"......",false,window) button = guiCreateButton(12,392,493,29,".......",false,window) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"...",false, window) guiSetVisible (window, false) function toggleGUI() if guiGetVisible (window ) then guiSetVisible(window,false) showCursor(false) else guiSetVisible(window,true) showCursor(true) end end addEvent("toggleGUI",true) addEventHandler("toggleGUI",root,toggleGUI) السيرفر نفسه اللي أول و الله العضيم تبقا مفتوحة على طول و بخرج من سيرفر و بدخل تفتح لوحدها Link to comment
nxFairlywell Posted July 18, 2014 Share Posted July 18, 2014 المشكلة الان انا لوحة تفتح عندي بدون ما اضغط على رمز لي مسوي انا و ما تكسر تبقا معلقةممكن مساعدة اخوي جرب حط الكلنت كذا : GUIEditor_Button = {} addEventHandler("onClientResourceStart", root, function() a = guiCreateWindow(175,97,529,430,".....",false) guiSetAlpha(a,1) guiSetVisible( a, false ) a = guiCreateMemo(10,22,510,297,"......",false,a) a = guiCreateMemo(11,321,507,69,".........",false,a) a = guiCreateButton(12,392,493,29,".......",false,a) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"",false) end ) function OpenWin() if guiGetVisible ( a ) then guiSetVisible ( a, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( a, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F7", "down", OpenWin) والسيرفر حطه زي الكود الاول حق ماكس Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 المشكلة الان انا لوحة تفتح عندي بدون ما اضغط على رمز لي مسوي انا و ما تكسر تبقا معلقةممكن مساعدة اخوي جرب حط الكلنت كذا : GUIEditor_Button = {} addEventHandler("onClientResourceStart", root, function() a = guiCreateWindow(175,97,529,430,".....",false) guiSetAlpha(a,1) guiSetVisible( a, false ) a = guiCreateMemo(10,22,510,297,"......",false,a) a = guiCreateMemo(11,321,507,69,".........",false,a) a = guiCreateButton(12,392,493,29,".......",false,a) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"",false) end ) والسيرفر حطه زي الكود الاول حق ماكس ؟؟؟؟؟؟؟ كله خطأ الأخطاء هي a = guiCreateWindow(175,97,529,430,".....",false) guiSetAlpha(a,1) guiSetVisible( a, false ) a = guiCreateMemo(10,22,510,297,"......",false,a) a = guiCreateMemo(11,321,507,69,".........",false,a) a = guiCreateButton(12,392,493,29,".......",false,a) كلها بأسم A ???? function OpenWin() if guiGetVisible ( a ) then guiSetVisible ( a, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( a, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F7", "down", OpenWin) لايوجد إيفنت علشان نسوي في ملف السيرفر تريقر Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 آسف نسيت أعدل شيجرب ذا كلنت window = guiCreateWindow(175,97,529,430,".....",false) guiWindowSetSizable(window, false) memo = guiCreateMemo(10,22,510,297,"......",false,window) button = guiCreateButton(12,392,493,29,".......",false,window) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"...",false, window) guiSetVisible (window, false) function toggleGUI() if guiGetVisible (window ) then guiSetVisible(window,false) showCursor(false) else guiSetVisible(window,true) showCursor(true) end end addEvent("toggleGUI",true) addEventHandler("toggleGUI",root,toggleGUI) السيرفر نفسه اللي أول و الله العضيم تبقا مفتوحة على طول و بخرج من سيرفر و بدخل تفتح لوحدها أطرح الكلنت كامل Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 -- Client GUIEditor_Button = {} addEventHandler("onClientResourceStart", root, function() a = guiCreateWindow(175,97,529,430,".....",false) guiSetAlpha(a,1) guiSetVisible( a, false ) a = guiCreateMemo(10,22,510,297,"......",false,a) a = guiCreateMemo(11,321,507,69,".........",false,a) a = guiCreateButton(12,392,493,29,".......",false,a) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"",false) end ) function OpenWin() if guiGetVisible ( a ) then guiSetVisible ( a, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( a, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F7", "down", OpenWin) --server addEventHandler("onPlayerJoin",root, function () bindKey(source,"F7","down",showGUI) end) addEventHandler("onResourceStart",resourceRoot, function () for index, player in ipairs(getElementsByType("player")) do bindKey(player,"F7","down",showGUI) end end) function showGUI(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("Console")) then triggerClientEvent(thePlayer,"toggleGUI",thePlayer) else outputChatBox(" You Dont Have Access to This Panel",thePlayer,255,0,0) end end اللوحة ما تضهر تماما Link to comment
xX|KeMo|Xx Posted July 18, 2014 Share Posted July 18, 2014 GUIEditor_Button = {} addEventHandler("onClientResourceStart", root, function() a = guiCreateWindow(175,97,529,430,".....",false) guiSetAlpha(a,1) guiSetVisible( a, false ) a1 = guiCreateMemo(10,22,510,297,"......",false,a) a2 = guiCreateMemo(11,321,507,69,".........",false,a) a3 = guiCreateButton(12,392,493,29,".......",false,a) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"",false) end ) function OpenWin() triggerServerEvent("OpenWin",getLocalPlayer()) end bindKey("F7", "down", OpenWin) addEvent("OpenWin", true) addEventHandler("OpenWin",root, function () if guiGetVisible(a) == false then guiSetVisible(a,true) showCursor(true) else guiSetVisible(a,false) showCursor(false) end end ) addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then triggerClientEvent(source,"OpenWin",source) end end ) Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 GUIEditor_Button = {} addEventHandler("onClientResourceStart", root, function() a = guiCreateWindow(175,97,529,430,".....",false) guiSetAlpha(a,1) guiSetVisible( a, false ) a1 = guiCreateMemo(10,22,510,297,"......",false,a) a2 = guiCreateMemo(11,321,507,69,".........",false,a) a3 = guiCreateButton(12,392,493,29,".......",false,a) GUIEditor_Button[1] = guiCreateButton(260,151,5,5,"",false) end ) function OpenWin() triggerServerEvent("OpenWin",getLocalPlayer()) end bindKey("F7", "down", OpenWin) addEvent("OpenWin", true) addEventHandler("OpenWin",root, function () if guiGetVisible(a) == false then guiSetVisible(a,true) showCursor(true) else guiSetVisible(a,false) showCursor(false) end end ) addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then triggerClientEvent(source,"OpenWin",source) end end ) بس باقي اانو لما ااخش سيرفر و انا لسة ما سجلت اللوحة تضهر و ما تسكر Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 تم تصلحيها مشكورييييييين شبااب على مجهودكم Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 بس مقدر اسوي كل رتب ? addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin","Console",'LVL1','LVL2','LVL3','LVL4','LVL5','Ownar','Manger','Support','Leader')) then triggerClientEvent(source,"OpenWin",source) end end ) سويتو كدا و ما زبط رتبة ادمن + كونسل لي بيعملو ممكن حل Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function() if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Admin' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Console' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL'1' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL2' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( ''LVL3' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL4' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL5' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Ownar' ) ) then triggerClientEvent(source,"OpenWin",source) end end ) Link to comment
xAymanixx Posted July 18, 2014 Author Share Posted July 18, 2014 addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function() if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Admin' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Console' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL'1' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL2' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( ''LVL3' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL4' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL5' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Ownar' ) ) then triggerClientEvent(source,"OpenWin",source) end end ) كان بعض الاخطا فكودك صلحتهم بس ما زبط addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function() if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Admin' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Console' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL1' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL2' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL3' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL4' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL5' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Ownar' ) ) then triggerClientEvent(source,"OpenWin",source) end end ) Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 نسيت أضيف player addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function(player) if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Admin' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Console' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL'1' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL2' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( ''LVL3' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL4' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'LVL5' ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( 'Ownar' ) ) then triggerClientEvent(source,"OpenWin",source) end end ) Link to comment
xX|KeMo|Xx Posted July 18, 2014 Share Posted July 18, 2014 ? ليه بلير هي السورس تــرآيقر جاي من الكلنت ما تشوف source Link to comment
xX|KeMo|Xx Posted July 18, 2014 Share Posted July 18, 2014 acl = {"Admin","Console","LVL1","LVL2","LVL3","LVL4","LVL5","Ownar","Manger","Support","Leader"} addEvent("OpenWin",true) addEventHandler("OpenWin",getRootElement(), function() for _, acl_ in ipairs (acl) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup(acl_)) then triggerClientEvent(source,"OpenWin",source) end end end ) Link to comment
KING-_-HOHO Posted July 18, 2014 Share Posted July 18, 2014 ? ليه بليرهي السورس تــرآيقر جاي من الكلنت ما تشوف source مآآشفتها Link to comment
xAymanixx Posted July 19, 2014 Author Share Posted July 19, 2014 تم صلحتها بمساعدتكم مشكورين شبااب 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