OnPackageStop: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
(3 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.}} | {{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.}} | ||
{{FuncSyntax|OnPackageStop()}} | {{FuncSyntax|OnPackageStop()}} | ||
== 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)