OnPackageStart: Difference between revisions
From Onset Developer Wiki
mNo edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
local function OnPackageStart() | |||
print(GetPackageName().." started") | |||
end | |||
AddEvent("OnPackageStart", OnPackageStart) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{PackageEvents}} | {{PackageEvents}} |
Latest revision as of 14:49, 27 January 2020
Description
Package was started and its scripts loaded. Use this event to initialize your script. For instance connecting to a database.
Syntax
OnPackageStart()
Example
local function OnPackageStart()
print(GetPackageName().." started")
end
AddEvent("OnPackageStart", OnPackageStart)