Jacobob14 Posted May 30, 2014 Share Posted May 30, 2014 there any way that this restriction if (not isObjectInACLGroup("user."..getAccountName(account),aclGetGroup(here groups))) then work with all groups of the table the scipt groups = { "|USS|", "|BSAA|", "|TwP|" } addEvent("Moderator1",true) function Moderator(player, groupname) local account = getPlayerAccount ( player ) local group = aclGetGroup ( "|BSAA|" ) if ( group ) then if (not isObjectInACLGroup("user."..getAccountName(account),aclGetGroup(here groups))) then aclGroupAddObject ( group, "user.".. getAccountName ( account )) outputChatBox ( "#ff0000[bSAA]#ffffff El user #a5d9f2^("..getAccountName(getPlayerAccount(player))..") #ffffff Fue Reclutado al clan ", source, 255, 255 ,255, true) else outputChatBox ( "error ", source, 255, 255 ,255, true) end end end addEventHandler("Moderator1", getRootElement(), Moderator) Link to comment
xXMADEXx Posted May 30, 2014 Share Posted May 30, 2014 try using this: groups = { "|USS|", "|BSAA|", "|TwP|" } addEvent("Moderator1",true) function Moderator(player, groupname) local account = getPlayerAccount ( player ) local group = aclGetGroup ( "|BSAA|" ) if ( group ) then local allowed = false for i, v in pairs ( groups ) do if ( isObjectInACLGroup("user."..getAccountName(account),aclGetGroup(v)) ) then allowed = true break end end if (not allowed ) then aclGroupAddObject ( group, "user.".. getAccountName ( account )) outputChatBox ( "#ff0000[bSAA]#ffffff El user #a5d9f2^("..getAccountName(getPlayerAccount(player))..") #ffffff Fue Reclutado al clan ", source, 255, 255 ,255, true) else outputChatBox ( "error ", source, 255, 255 ,255, true) end end end addEventHandler("Moderator1", getRootElement(), Moderator) Link to comment
Jacobob14 Posted May 30, 2014 Author Share Posted May 30, 2014 and if I want a message to tell the group that this would be fine as well outputChatBox ( "#ff0000[ERROR] #ffffffel usuario #ff0000^("..getAccountName(getPlayerAccount(player))..")#ffffff ya tiene clan"..aclGetGroup(v), source, 200, 0 ,0, true) 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