ScriptingExamples/PlayerKillCommand: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(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...")
 
(No difference)

Latest revision as of 19:13, 14 August 2018

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)