New Item Types

By default there's some pre configured item types (food, drinks, box, joints, others). In this little guide we are gonna create a new item type named alcohol:

1) Go to config/_config.lua and add the new item type in Config.ItemTypes

2) In the same file scroll down to Config.Events and add a new zone

  • You can note the index key is named exactly the same as the ItemType value ['alcohol']

  • You need to edit the event name.

  • Set your desired icon.

3) In client/framework duplicate the file named drinks.lua and rename it to whatever name you want, we are adding alcohol so I'll name it alcohol.lua

4) Please note the code says the word drink everywhere, change it to alcohol (or the item type you are creating):

5) Add the word 'alcohol' to config/lang.lua

6) If u want the item to have some effect go to client/framework/items.lua and add a new "if" like this:

7) Restart the script and you should be able to create a new zone named Alcohol with the admin command.

Last updated