Personal tools

Lua/Events/Server/EntityRemove

From JC2-MP Documentation

< Lua
Jump to: navigation, search
Name    EntityRemove
Arguments (in table)    object entity
Return option    None


Description

entity can be one of:

  • Player
  • Vehicle
  • Checkpoint
  • StaticObject
  • ClientStaticObject
  • ClientEffect
  • ClientSound

To get the type, use args.entity.__type.

Example

function Foo(args)
	print("A "..args.entity.__type.." was just removed.")
end
 
Events:Subscribe("EntityRemove", Foo)