Adham Posted July 10, 2016 Posted July 10, 2016 سلام عليكم انا مسوي button ابيه يقفل ويفتح للقروبات المححده يعني انا ابي اسوي ال button مقفل عند الناس يفتح للقروبات المحدده .
Me[Z]oO Posted July 10, 2016 Posted July 10, 2016 سلام عليكم انا مسوي button ابيه يقفل ويفتح للقروبات المححده يعني انا ابي اسوي ال button مقفل عند الناس يفتح للقروبات المحدده . قروبات ACL ?
#1Topro Posted July 10, 2016 Posted July 10, 2016 سلام عليكم انا مسوي button ابيه يقفل ويفتح للقروبات المححده يعني انا ابي اسوي ال button مقفل عند الناس يفتح للقروبات المحدده . كيف وانت كنت مسوي مود المخالفات ؟ وكان في بوتن مثل الي تقول عنه -_-"
Me[Z]oO Posted July 10, 2016 Posted July 10, 2016 (edited) --Client Side guiSetEnabled ( button,false ) -- اسم الزرbutton addEvent ('Open',true) addEventHandler('Open',root, function() guiSetEnabled ( button,true ) -- اسم الزرbutton end) --Server Side local Groups = { "Console", } addEventHandler('onPlayerLogin',root, function(_,acc) if not source:getAccount() or source:getAccount():isGuest() then return end for _,v in ipairs ( Groups ) do if ACLGroup.get(v):doesContainObject( "user."..source:getAccount():getName()) then triggerClientEvent ( source, "Open", source ) break end end end) Edited July 10, 2016 by Guest
Adham Posted July 10, 2016 Author Posted July 10, 2016 سلام عليكم انا مسوي button ابيه يقفل ويفتح للقروبات المححده يعني انا ابي اسوي ال button مقفل عند الناس يفتح للقروبات المحدده . كيف وانت كنت مسوي مود المخالفات ؟ وكان في بوتن مثل الي تقول عنه -_-" الكود معي علي الجهاز .. بس م لاقيه .. اخ ميزو كودك صحيح يب لاكن انا لما عطيت نفسي كونسل في نفس الوقت م فتحت طلعت ودخلت فتحت لي عادي لاكن انا ابيها اول م يكون معه رتبة كونسل
Adham Posted July 10, 2016 Author Posted July 10, 2016 طيب . حولت اعملها كذا م نفعت #Client guiSetEnabled ( GUIEditor.checkbox[2],false ) -- اسم الزرbutton triggerServerEvent("check",localPlayer) addEvent ('Open',true) addEventHandler('Open',root, function() guiSetEnabled ( GUIEditor.checkbox[2],true ) -- اسم الزرbutton end) #Server GroupsAdmin = { [1] = {Group='Admins'}, [2] = {Group='Console'}, [3] = {Group='Level 5'}, [4] = {Group='Level 6'}, [5] = {Group='Head.Admin'} } addEvent('check',true) addEventHandler('check',root, function ( ) for _, v in ipairs(GroupsAdmin) do if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(v.Group)) then triggerClientEvent(source,"Open",source) return false end end end)
Adham Posted July 10, 2016 Author Posted July 10, 2016 انا ابي لما معه الرتبة عطول ونا فاكر اني كنت معي كود وطرحت لك السرفر
Me[Z]oO Posted July 10, 2016 Posted July 10, 2016 (edited) Timer( function() for i,plr in ipairs (Element.getAllByType('player')) do if ACLGroup.get('Console'):doesContainObject( "user."..plr:getAccount():getName()) then triggerClientEvent ( plr, "Open", plr ) end end end,200,0) تفضل Edited July 10, 2016 by Guest
a7zan Posted July 10, 2016 Posted July 10, 2016 --Client Side guiSetEnabled ( button,false ) -- اسم الزرbutton addEvent ('Open',true) addEventHandler('Open',root, function() guiSetEnabled ( button,true ) -- اسم الزرbutton end) --Server Side local Groups = { "Console", } addEventHandler('onPlayerLogin',root, function(_,acc) if not source:getAccount() or source:getAccount():isGuest() then return end for _,v in ipairs ( Groups ) do if ACLGroup.get(v):doesContainObject( "user."..source:getAccount():getName()) then triggerClientEvent ( source, "Open", source ) break end end end) ليش مصعب المسألة ومستخدم oop + كذا ماراح يشتغل معه لين مايضيف بالميتا true + ليه حاط بارتمنز وما استخدمته
Me[Z]oO Posted July 10, 2016 Posted July 10, 2016 خليته يحط بالميتا لا تخاف استخدمته بالاول وبعدين سحبت عليه ض
a7zan Posted July 10, 2016 Posted July 10, 2016 Timer( function() for i,plr in ipairs (Element.getAllByType('player')) do if ACLGroup.get('Console'):doesContainObject( "user."..plr:getAccount():getName()) then triggerClientEvent ( plr, "Open", plr ) end end end,200,0) تفضل ناقصك تتحقق ان الاعبين مسجلين دخول واستخدم الفنكشن ذا getPlayersInGroup
Me[Z]oO Posted July 10, 2016 Posted July 10, 2016 مو لازم اتحقق بتسجيل الدخول لاني تحققت انه بالقروب كونسل + شوف طلبه كويس
Me[Z]oO Posted July 10, 2016 Posted July 10, 2016 الان انا اشيل من الميتادا ولا وش true حط ذا بالميتا
a7zan Posted July 10, 2016 Posted July 10, 2016 مو لازم اتحقق بتسجيل الدخوللاني تحققت انه بالقروب كونسل + شوف طلبه كويس انت سويت لوب ولازم تتحقق ان فيه لاعبين مسجلين دخول لاكن انه بقروب كونسل هذا شي ثاني كيف تجيب حسابه وهو ماهو مسجل دخول ؟
Adham Posted July 10, 2016 Author Posted July 10, 2016 الخطا هنا؟ GroupsAdmin = { [1] = {Group='Admins'}, [2] = {Group='Console'}, [3] = {Group='Level 5'}, [4] = {Group='Level 6'}, [5] = {Group='Head.Admin'} } addEvent('check',true) addEventHandler('check',root, function ( ) for _, v in ipairs(GroupsAdmin) do if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(v.Group)) then triggerClientEvent(source,"Open",source) return false end end end)
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