Garry's Mod Wiki

Revision Difference

Player:Deaths#524796

<function name="Deaths" parent="Player" type="classfunc"> <description>Returns the player's death count</description> <realm>Shared</realm> <rets> <ret name="" type="number">The number of deaths the player has had.</ret> </rets> </function> <example> <description>If the player's deaths are over 10, then they cannot spawn.</description> <code> function GM:PlayerDeathThink( ply, ent, att ) if ply:Deaths() &gt;= 10 then if ply:Deaths() >= 10 then return false end return true end </code> <output>The player will not be able to spawn after they've died 10 times.</output> </example>