diff options
Diffstat (limited to 'tutorials/tut041_not_enough_items.md')
| -rw-r--r-- | tutorials/tut041_not_enough_items.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tutorials/tut041_not_enough_items.md b/tutorials/tut041_not_enough_items.md new file mode 100644 index 0000000..895e1fd --- /dev/null +++ b/tutorials/tut041_not_enough_items.md @@ -0,0 +1,27 @@ +# Tut 0x041 + +## Not enough items + +It frequently happens that you want many items with only slight variations. In this tutorial we'll see how to create a item drop for every monster. We'll find all the npc's that the game knows about, and create an item (a corpse) for each one. + +First, we need to find all the npc's the game knows about, then create an item for each one. + +garrysmod/addons/artery_routelite/data/artery/global/npc_corpses.lua +``` +local base = {} + +base.Name = "Meat base" + +base.weight = 10 + +function base:Serialize() + return "" +end + +function base:DeSerialize() + return table.Copy(self) +end + + + +``` |
