Jump to content

x[ طلب ]x Code


Recommended Posts

  Le3bA said:
سلام عليكم انا مسوي button

ابيه يقفل

ويفتح للقروبات المححده

يعني انا ابي اسوي

ال button

مقفل عند الناس

يفتح للقروبات المحدده .

كيف وانت

كنت مسوي مود المخالفات ؟

وكان في بوتن مثل الي تقول عنه -_-"

Link to comment

 --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 by Guest
Link to comment
  #1Topro said:
  Le3bA said:
سلام عليكم انا مسوي button

ابيه يقفل

ويفتح للقروبات المححده

يعني انا ابي اسوي

ال button

مقفل عند الناس

يفتح للقروبات المحدده .

كيف وانت

كنت مسوي مود المخالفات ؟

وكان في بوتن مثل الي تقول عنه -_-"

الكود معي علي الجهاز ..

بس م لاقيه ..

اخ ميزو

كودك صحيح يب

لاكن انا لما عطيت نفسي كونسل في نفس الوقت

م فتحت

طلعت ودخلت فتحت لي عادي

لاكن انا ابيها اول م يكون معه رتبة كونسل

Link to comment

طيب .

حولت اعملها كذا م نفعت

#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) 
  
Link to comment

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) 

تفضل :arrowup:

Edited by Guest
Link to comment
  Me[Z]oO said:
 --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

+

ليه حاط بارتمنز وما استخدمته

Link to comment
  Me[Z]oO said:
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) 

تفضل :arrowup:

ناقصك تتحقق ان الاعبين مسجلين دخول

واستخدم الفنكشن ذا

getPlayersInGroup

Link to comment
  Me[Z]oO said:
مو لازم اتحقق بتسجيل الدخول

لاني تحققت انه بالقروب كونسل

+ شوف طلبه كويس

انت سويت لوب

ولازم تتحقق ان فيه لاعبين مسجلين دخول

لاكن انه بقروب كونسل هذا شي ثاني

كيف تجيب حسابه وهو ماهو مسجل دخول ؟

Link to comment

الخطا هنا؟

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