Garry's Mod Wiki

Player:Kill

void 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: 41ms

Session 0
DB GetPage 8
Generate Html 0
SaveChanges 19
Render Body 0
Render Sidebar 12