07-08-2016, 07:49 AM
(07-08-2016, 07:29 AM)LeSanglier Wrote: And my other question is how to disable the spawning monster?
HOOK_SPAWNING_MONSTER and cMonster, docs are handy
First add the hook for HOOK_SPAWNING_MONSTER, and in there check what type the mob is (I'm assuming you want to disable hostile mobs) using cMonster:GetMobFamily(). Then if you want to disable the mob from spawning, return true. Otherwise, return false and the mob will spawn.
You can find an example here.