Jump to content

Help with community legal system


xXMADEXx

Recommended Posts

How can i make

            if detectmethod == "team" then 
                local copteam = get("legalsystem.Copteam") 
                local thisTeam = getPlayerTeam(thePlayer) 
                if thisTeam ~= false then 
                    if thisTeam == getTeamFromName(copteam) then 
                        setElementParent ( thePlayer, kingCOP ) 
                    else 
                        setElementParent ( thePlayer, kingCIV ) 
                    end 
                end 

work with more then just one team?

Link to comment

NOT TESTED !!

  
if detectmethod == "team" then 
    local copteam = get( "legalsystem.Copteam" ) 
    local thisTeam = getPlayerTeam( thePlayer ) 
    if thisTeam ~= false then 
        if thisTeam == getTeamFromName( copteam ) then 
            setElementParent ( thePlayer, kingCOP ) 
        else 
            setElementParent ( thePlayer, kingCIV ) 
        elseif thisTeam == getTeamFormName ( TheName ) then 
            setElementParent ( thePlayer, kingCOP )  
        else 
            setElementParent ( thePlayer, kingCIV ) 
        end      
    end 
end 
  

Hope it works :D

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