Personal tools

Lua/Events/Client/EntityBulletHit

From JC2-MP Documentation

< Lua
Jump to: navigation, search
Name    EntityBulletHit
Arguments (in table)    LocalPlayer attacker, ClientEntity entity, number damage, Bone bone
Return option    None


Description

Fired when you hit an entity with a bullet. bone is the bone hit by a bullet.

Examples

Foo = function(args)
	local message = "You hit " .. tostring(args.entity).." for "..tostring(args.damage).." damage!"
	Chat:Print(message, Color(255, 255, 255))
end
 
Events:Subscribe("EntityBulletHit", Foo)