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. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
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. Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
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