xXMADEXx Posted February 9, 2013 Share Posted February 9, 2013 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
PaiN^ Posted February 9, 2013 Share Posted February 9, 2013 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 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