MetaGamer Posted November 10, 2011 Share 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? Link to comment
^Dev-PoinT^ Posted November 10, 2011 Share Posted November 10, 2011 i think its a Tabel Link to comment
Castillo Posted November 10, 2011 Share Posted November 10, 2011 You can't create "sub" teams, but you can set element data to the player. Link to comment
MetaGamer Posted November 10, 2011 Author Share Posted November 10, 2011 Not possible with dxscoreboard also? Link to comment
Castillo Posted November 10, 2011 Share 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. Link to comment
MetaGamer Posted November 10, 2011 Author Share 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. Link to comment
Maurize Posted November 10, 2011 Share 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 ) Link to comment
Aibo Posted November 10, 2011 Share 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 ) 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