<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jay+Deshaun</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jay+Deshaun"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Jay_Deshaun"/>
	<updated>2026-05-02T08:00:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Element/Team&amp;diff=25492</id>
		<title>Element/Team</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Element/Team&amp;diff=25492"/>
		<updated>2011-03-16T05:45:27Z</updated>

		<summary type="html">&lt;p&gt;Jay Deshaun: /* Related scripting functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The team class represents player teams. Players on the same team can use team features such as teamchat or friendly fire.&lt;br /&gt;
&lt;br /&gt;
The element type of this class is: '''&amp;quot;team&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' It is likely that the colorR/G/B values will be changed to the more standard color=&amp;quot;#RRGGBB&amp;quot; before the final release.&lt;br /&gt;
&lt;br /&gt;
==XML syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;team name=&amp;quot;&amp;quot; colorR=&amp;quot;&amp;quot; colorG=&amp;quot;&amp;quot; colorB=&amp;quot;&amp;quot; friendlyfire=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Attributes===&lt;br /&gt;
* '''name''': A name of the team&lt;br /&gt;
&lt;br /&gt;
===Optional Attributes===&lt;br /&gt;
* '''colorR''': The red component of the team's color&lt;br /&gt;
* '''colorG''': The green component of the team's color&lt;br /&gt;
* '''colorB''': The blue component of the team's color&lt;br /&gt;
* '''friendlyfire''': Should friendly fire be allowed (true/false)&lt;br /&gt;
&lt;br /&gt;
==Related scripting functions==&lt;br /&gt;
===Client===&lt;br /&gt;
{{Client_team_functions}}&lt;br /&gt;
===Server===&lt;br /&gt;
{{Team functions}}&lt;br /&gt;
[[Category:Element Types]]&lt;/div&gt;</summary>
		<author><name>Jay Deshaun</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Element/Team&amp;diff=25490</id>
		<title>Element/Team</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Element/Team&amp;diff=25490"/>
		<updated>2011-03-16T05:40:10Z</updated>

		<summary type="html">&lt;p&gt;Jay Deshaun: /* Related scripting functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The team class represents player teams. Players on the same team can use team features such as teamchat or friendly fire.&lt;br /&gt;
&lt;br /&gt;
The element type of this class is: '''&amp;quot;team&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' It is likely that the colorR/G/B values will be changed to the more standard color=&amp;quot;#RRGGBB&amp;quot; before the final release.&lt;br /&gt;
&lt;br /&gt;
==XML syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;team name=&amp;quot;&amp;quot; colorR=&amp;quot;&amp;quot; colorG=&amp;quot;&amp;quot; colorB=&amp;quot;&amp;quot; friendlyfire=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Attributes===&lt;br /&gt;
* '''name''': A name of the team&lt;br /&gt;
&lt;br /&gt;
===Optional Attributes===&lt;br /&gt;
* '''colorR''': The red component of the team's color&lt;br /&gt;
* '''colorG''': The green component of the team's color&lt;br /&gt;
* '''colorB''': The blue component of the team's color&lt;br /&gt;
* '''friendlyfire''': Should friendly fire be allowed (true/false)&lt;br /&gt;
&lt;br /&gt;
==Related scripting functions==&lt;br /&gt;
===Client===&lt;br /&gt;
{{Client_team_functions}}&lt;br /&gt;
===Server===&lt;br /&gt;
{{Team functions}}&lt;br /&gt;
===Client And Server===&lt;br /&gt;
{{Client and Server}}&lt;br /&gt;
[[Category:Element Types]]&lt;/div&gt;</summary>
		<author><name>Jay Deshaun</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;diff=25489</id>
		<title>CreateTeam</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;diff=25489"/>
		<updated>2011-03-15T20:00:07Z</updated>

		<summary type="html">&lt;p&gt;Jay Deshaun: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function is for creating a new [[team]], which can be used to group players. Players will not join the team until they are respawned.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
team createTeam ( string teamName, [int colorR = 255, int colorG = 255, int colorB = 255] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''teamName:''' A string representing the teams name.&lt;br /&gt;
*'''colorR:''' An integer representing the red color value.&lt;br /&gt;
*'''colorG:''' An integer representing the green color value.&lt;br /&gt;
*'''colorB:''' An integer representing the blue color value.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a team element if it was successfully created, ''false'' if invalid arguments are passed or a team with that name already exists.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example creates a new team for a player, then adds him to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function gimmeATeam ( source, commandName, teamName )&lt;br /&gt;
  local newTeam = createTeam ( teamName ) -- create a new team with the specified name&lt;br /&gt;
  if newTeam then -- if it was successfully created&lt;br /&gt;
    setPlayerTeam ( source, newTeam ) -- add the player to the new team&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;giveteam&amp;quot;, gimmeATeam )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example creates two teams, one for Admin and one for Freeroamers, when the resource this script is in is started.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createTeamsOnStart ()&lt;br /&gt;
	teamAdmmin = createTeam ( &amp;quot;Admin&amp;quot;, 0, 255, 0 ) --change the 3 numbers(0,255,0), the first number is ColourR, the second is ColourG, and the last one is ColourB&lt;br /&gt;
	teamFreeroamers = createTeam ( &amp;quot;Freeroamer&amp;quot;, 200, 0, 100 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onResourceStart&amp;quot;, getResourceRootElement(getThisResource()), createTeamsOnStart  ) --we attach the function to this resource's root element&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Team_functions}}&lt;/div&gt;</summary>
		<author><name>Jay Deshaun</name></author>
	</entry>
</feed>