OnPackageStop: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Event|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|OnPackageStop}} {{FuncParameters}} == Example == __EDIT_ME__ {{RelatedFunctions}} {{ServerEvents}}" |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Event|Server|1.0}} | {{Info|Event|Server & Client|1.0}} | ||
{{FuncDescription| | {{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)