!# H E R O ,_ Posted February 19, 2019 Share Posted February 19, 2019 14 minutes ago, DABL said: player1 X account Y + يب ما خت بالي معلششش .. Link to comment
Doffy Posted February 19, 2019 Share Posted February 19, 2019 (edited) عندي لك وظيفة احسن بس بسويها لك علسريع tableGroups = { {"Admin"}, {"Police"}, --- إلخ } function removePlayerGroups ( thePlayer ) if ( thePlayer ) then if ( getElementType(thePlayer) == "player" ) then if not isGuestAccount(thePlayer) then for i,ACLGroups in ipairs ( tableGroups ) do local hisAccountName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..hisAccountName, aclGetGroup ( ACLGroups[1] ) ) then aclGroupRemoveObject (aclGetGroup(ACLGroups[1]), "user."..hisAccountName) end end end else error("Bad argument #1 the element not a player") end else error("Bad argument #1 player not found") end end هذا بأختصار يحذفلك اي قروب انت تحطه بالجدول الي مسويه لك بالاول علشان يعني لو ما تبي تحذف رتبته وهو كونسول مثلا او ما تبي تحذف منه قروبات معينة يعني ولو في اخطاء ياليت تنبهوني لاني بالجوال + لي كثير ما برمجت شي Edited February 19, 2019 by !#DesTroyeR_,) Link to comment
KillerX Posted February 19, 2019 Share Posted February 19, 2019 (edited) 2 hours ago, !#DesTroyeR_,) said: عندي لك وظيفة احسن بس بسويها لك علسريع tableGroups = { {"Admin"}, {"Police"}, --- إلخ } function removePlayerGroups ( thePlayer ) if ( thePlayer ) then if ( getElementType(thePlayer) == "player" ) then if not isGuestAccount(thePlayer) then for i,ACLGroups in ipairs ( tableGroups ) do local hisAccountName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..hisAccountName, aclGetGroup ( ACLGroups[1] ) ) then aclGroupRemoveObject (aclGetGroup(ACLGroups[1]), "user."..hisAccountName) end end end else error("Bad argument #1 the element not a player") end else error("Bad argument #1 player not found") end end tableGroups = { "Admin", "Police", --- إلخ } function removePlayerGroups ( thePlayer ) if ( isElement(thePlayer) and getElementType( thePlayer ) == 'player' ) then if not isGuestAccount(getPlayerAccount(thePlayer)) then local hisAccountName = getAccountName(getPlayerAccount(thePlayer)) for i , acl in pairs( tableGroups ) do if( aclGetGroup( acl ) ) then if(isObjectInACLGroup( "user."..hisAccountName , aclGetGroup(acl) ) ) then aclGroupRemoveObject (aclGetGroup(acl), "user."..hisAccountName) end end end end else error("Bad argument #1 player not found") end end Edited February 19, 2019 by KillerX 1 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