Garry's Mod Wiki

Revision Difference

team.TotalDeaths#544159

<function name="TotalDeaths" parent="team" type="libraryfunc"> <description>Returns the sum of deaths of all players of the team.</description> <description>Returns the total number of deaths of all players in the team.</description> <realm>Shared</realm> <args> <arg name="teamIndex" type="number">The team index.</arg> <arg name="index" type="number">The team index.</arg> </args> <rets> <ret name="" type="number">deathCount</ret>⤶ <ret name="" type="number">Total deaths in team.</ret>⤶ </rets> </function> <example> <description>Get's the total deaths in a team.</description> <code>print(team.TotalDeaths(ply:Team()),team.TotalDeaths(1))</code>⤶ <output>2</output>⤶ ⤶ </example> <description>Outputs the name and total deaths of all existing teams.</description> <code>⤶ for k,v in pairs(team.GetAllTeams()) do⤶ print(v.Name, team.TotalDeaths(k))⤶ end⤶ </code>⤶ </example>