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 )

Page Links


Special Pages


Wikis

?

Render Time: 29ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 12