aboutsummaryrefslogtreecommitdiff
path: root/zone_example.lua
diff options
context:
space:
mode:
Diffstat (limited to 'zone_example.lua')
-rw-r--r--zone_example.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/zone_example.lua b/zone_example.lua
index 737c706..c2540ca 100644
--- a/zone_example.lua
+++ b/zone_example.lua
@@ -144,5 +144,17 @@ end)
zone.onlyIfShes = "5'3\""
end
end)
+
+ -- Example of the OnZoneLoaded hook.
+ -- This hook is called as a zone is loaded into the game, typically on map startup. Only called serverside.
+ -- Arguments are:
+ -- zone - The full zone table of the zone we are editing.
+ -- class - The class of the zone.
+ -- zoneID - The ID of the zone.
+ hook.Add("OnZoneLoaded","hookname_unique",function(zone,class,zoneID)
+ if class == "Baby Got Back" then --always check class.
+ zone.owner = Entity(1)
+ end
+ end)
]]