Player Kill Command

From GTA Connected
Revision as of 19:13, 14 August 2018 by Mex (talk | contribs) (Created page with "{{DISPLAYTITLE:Player Kill Command}} == Description == This code sets the health to zero for anyone who types the command /kill. == Code == '''Lua, Client-Side, GTAC versions...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

This code sets the health to zero for anyone who types the command /kill.

Code

Lua, Client-Side, GTAC versions 1.0.72 and newer:

addCommandHandler('kill', function(cmd,args)
	localPlayer.health = 0
end)