Garry's Mod Wiki

Player:Kill

  Player:Kill()

Description

Kills a player and calls GM:PlayerDeath.

Example

When the user types "/respawn" the user will be killed and then respawned.

hook.Add( "PlayerSay", "RespawnCommand", function( ply, text, public ) if ( string.lower( text ) == "/respawn" ) then ply:Kill() ply:Spawn() return "" end end )