Garry's Mod Wiki

Garry's Mod Wiki

  number Player:Deaths()

Description

Returns the player's death count

Returns

1 number
The number of deaths the player has had.

Example

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

hook.Add( "PlayerDeathThink", "BlockSpawning", function( ply, ent, att ) return ply:Deaths() < 10 -- If less than 10 deaths then allow to spawn end )
Output: The player will not be able to spawn after they've died 10 times.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...