Jump to content

help :(


Recommended Posts

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

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

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

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