Player/Deaths

From Garry's Mod
Jump to: navigation, search
 Player:Deaths( )

Contents

Description

Returns the player's death count

Returns

number

The number of deaths the player has had.

Examples

Example

If the player's deaths are over 10, then they cannot spawn.

function GM:PlayerDeathThink( ply, ent, att )

	if ply:Deaths() >= 10 then

		return false

	end

   return true

end

Output:

The player will not be able to spawn after they've died 10 times.
Personal tools
Navigation