JohnDoe91286 Posted December 11, 2009 Posted December 11, 2009 Could anybody help point out or show an example of how to outputChatBox something to everybody in a certain team? Thanks.
Nich Posted December 11, 2009 Posted December 11, 2009 https://wiki.multitheftauto.com/wiki/GetPlayersInTeam
JohnDoe91286 Posted December 11, 2009 Author Posted December 11, 2009 Thanks for the link, on the outputChatBox who would I put as the visibleTo argument?
50p Posted December 11, 2009 Posted December 11, 2009 Could anybody help point out or show an example of how to outputChatBox something to everybody in a certain team? Thanks. outputChatBox is one of those functions which works like it should with element tree. I'm not 100% sure if setPlayerTeam changes their parent as well but if it does, you should be able to send message to team element, for instance: outputChatBox( "hello blue team", getTeamFromName( "Blue" ) ) If that doesn't work, you can set player's parent to team element and then it should work but if that doesn't work, the worst case is to getPlayersInTeam and loop through them.
robhol Posted December 11, 2009 Posted December 11, 2009 Try the team element. if not, get the team's active players with the previously mentioned function, loop through them, sending the message each iteration.
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