MetaGamer Posted November 10, 2011 Posted November 10, 2011 Well, I am in a situation where I have to make a team inside a team. For example, Officer inside of Cop. How to do that?
Castillo Posted November 10, 2011 Posted November 10, 2011 You can't create "sub" teams, but you can set element data to the player.
MetaGamer Posted November 10, 2011 Author Posted November 10, 2011 Not possible with dxscoreboard also?
Castillo Posted November 10, 2011 Posted November 10, 2011 You can add a column with the "sub" team name, if you want something else, you'll have to edit the scoreboard.
MetaGamer Posted November 10, 2011 Author Posted November 10, 2011 You can add a column with the "sub" team name, if you want something else, you'll have to edit the scoreboard. Thank you. If it didn't work, then I will post the problem here.
Maurize Posted November 10, 2011 Posted November 10, 2011 Team = createTeam( "Police", 0, 0, 255 ) addCommandHandler( "duty", function( thePlayer, cmd ) setElementData( thePlayer, "Sheriff", true ) setPlayerTeam( thePlayer, Team ) end ) addCommandHandler( "check", function( thePlayer, cmd ) local SubTeam = getElementData( thePlayer, "Sheriff" ) local MainTeam = getTeamName( getPlayerTeam( thePlayer ) ) outputChatBox( "Your Mainteam is :"..MainTeam..", and your Subteam is :"..SubTeam..".", thePlayer, 0, 0, 255 ) end )
Aibo Posted November 10, 2011 Posted November 10, 2011 Team = createTeam( "Police", 0, 0, 255 ) addCommandHandler( "duty", function( thePlayer, cmd ) setElementData( thePlayer, "Sheriff", true ) setPlayerTeam( thePlayer, Team ) end ) addCommandHandler( "check", function( thePlayer, cmd ) local SubTeam = getElementData( thePlayer, "Sheriff" ) local MainTeam = getTeamName( getPlayerTeam( thePlayer ) ) outputChatBox( "Your Mainteam is :"..MainTeam..", and your Subteam is :"..SubTeam..".", thePlayer, 0, 0, 255 ) end ) actually it will error with "attempt to concatenate boolean", since the element data contains true, and not a team name. Team = createTeam( "Police", 0, 0, 255 ) addCommandHandler( "duty", function( thePlayer, cmd ) setElementData( thePlayer, "SubTeam", "Sheriff" ) setPlayerTeam( thePlayer, Team ) end ) addCommandHandler( "check", function( thePlayer, cmd ) local SubTeam = getElementData( thePlayer, "SubTeam" ) or "None" local MainTeam = getTeamName( getPlayerTeam( thePlayer ) ) outputChatBox( "Your Mainteam is: "..MainTeam..", and your Subteam is: "..SubTeam..".", thePlayer, 0, 0, 255 ) end )
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