OnPackageStop: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Event|Server|1.0}} | {{Info|Event|Server & Client|1.0}} | ||
{{FuncDescription|Package is being stopped. Cleanup your allocated resources here. At this point all timers started by this package have been killed already. Also plugins were notified about the package unload.}} | {{FuncDescription|Package is being stopped. Cleanup your allocated resources here. At this point all timers started by this package have been killed already. Also plugins were notified about the package unload.}} | ||
Line 6: | Line 6: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
AddEvent("OnPackageStop", function() | |||
-- Do some cleanup here | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{ | {{PackageServerEvents}} |
Latest revision as of 19:29, 30 August 2020
Description
Package is being stopped. Cleanup your allocated resources here. At this point all timers started by this package have been killed already. Also plugins were notified about the package unload.
Syntax
OnPackageStop()
Example
AddEvent("OnPackageStop", function()
-- Do some cleanup here
end)