-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.lua
37 lines (35 loc) · 1.14 KB
/
base.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
-- base addon module
hooks = {
onTick="onTick",
onCreate="onCreate",
onDestroy="onDestroy",
onCustomCommand="onCustomCommand",
onChatMessage="onChatMessage",
onPlayerJoin="onPlayerJoin",
onPlayerSit="onPlayerSit",
onCharacterSit="onCharacterSit",
onPlayerRespawn="onPlayerRespawn",
onPlayerLeave="onPlayerLeave",
onToggleMap="onToggleMap",
onPlayerDie="onPlayerDie",
onVehicleSpawn="onVehicleSpawn",
onVehicleLoad="onVehicleLoad",
onVehicleTeleport="onVehicleTeleport",
onVehicleDespawn="onVehicleDespawn",
onVehicleUnload="onVehicleUnload",
onVehicleDamaged="onVehicleDamaged",
onSpawnAddonComponent="onSpawnAddonComponent",
httpReply="httpReply",
onFireExtinguished="onFireExtinguished",
onForestFireSpawned="onForestFireSpawned",
onForestFireExtinguished="onForestFireExtinguished",
onButtonPress="onButtonPress",
onObjectLoad="onObjectLoad",
onObjectUnload="onObjectUnload",
onGroupSpawn="onGroupSpawn"
}
hook_funcs = {}
function AddHook(hook, func)
if not hook_funcs[hook] then hook_funcs[hook] = {} end
table.insert(hook_funcs[hook], func)
end