Entity:CallOnRemove
Description
Causes a specified function to be run if the entity is removed by any means. This can later be undone by Entity:RemoveCallOnRemove if you need it to not run.
This hook is called during clientside full updates. See ENTITY:OnRemove for more information.
Issue Tracker: 4675
Issue Tracker: 4675
Using players with this function will provide a gimped entity to the callback.
Arguments
3 vararg argn...
Optional arguments to pass to removeFunc. Do note that the first argument passed to the function will always be the entity being removed, and the arguments passed on here start after that.
Example
Stops an engine sound when the entity is removed