This code sets the health to zero for anyone who types the command /kill.
Lua, Client-Side, GTAC versions 1.0.72 and newer:
addCommandHandler('kill', function(cmd,args) localPlayer.health = 0 end)