06.07.2017, 10:24
(
Last edited by Gammix; 08/07/2017 at 04:39 AM.
)
Inventory & Items
This is a simple(maybe!) inventory system you can use in a survival or hunger game sort of server. I guess its bugs free so far from the testing i did. Its very easy to use and quiet modern. I wanted to use this for my new hunger games mode, but i guess i am taking a break right now so this might be helpful for someone!
Some core features:
Screenshot
Required Libraries & Credits
Streamer plugin - https://sampforum.blast.hk/showthread.php?tid=102865
ColAndreas plugin - https://sampforum.blast.hk/showthread.php?tid=586068
Sscanf2 plugin - https://sampforum.blast.hk/showthread.php?tid=602923
I-ZCMD include - https://sampforum.blast.hk/showthread.php?tid=576114
Dialogs include - https://sampforum.blast.hk/showthread.php?tid=570213
EasyDialog include (by Emmet_) - https://github.com/Agneese-Saini/SA-...easydialog.inc
Download
https://github.com/Agneese-Saini/SA-.../inventory.pwn
This is a simple(maybe!) inventory system you can use in a survival or hunger game sort of server. I guess its bugs free so far from the testing i did. Its very easy to use and quiet modern. I wanted to use this for my new hunger games mode, but i guess i am taking a break right now so this might be helpful for someone!
Some core features:
- Press "Y" to open inventory!
- Scroll bar for left menu i.e. list of items near the player (on floor).
- Custom item positioning which saves with the type, so if you need a specific rotation for a specific item type, you can simply /edititem and all the items with that type will have new rotation set.
- Animations upon picking and droping items.
- Maximum 15 items per player, you can decrease but cannot increase from 15, check Settings for modification.
- The left and right menu are completely dynamic, if a player picks an item from your ground, that item will disappear from your textdraw list!
- Double click on left menu items to quick pick them up.
- Double click on right menu items to quick use them.
- Press ESC to close the inventory.
- Login as RCON admin
- Type /newitem, and create a new item
- (*Optional) If you want to adjust the rotation or Z push, type /edititem and select the item you recently added.
- Now the item has been created and is in your created item history. In order to duplicate that item, type /additem and select the item from the list, thats it!
PHP Code:
// Settings
enum
{
BACKGROUND = 1263615688,
LEFT_BACKGROUND = 1853316296,
RIGHT_BACKGROUND = 1853316296,
SELECTED = 0xd63417BB,
FONT = 1,
MAX_PLAYER_ITEMS = 10 // maximum = 15
};
//
Required Libraries & Credits
Streamer plugin - https://sampforum.blast.hk/showthread.php?tid=102865
ColAndreas plugin - https://sampforum.blast.hk/showthread.php?tid=586068
Sscanf2 plugin - https://sampforum.blast.hk/showthread.php?tid=602923
I-ZCMD include - https://sampforum.blast.hk/showthread.php?tid=576114
Dialogs include - https://sampforum.blast.hk/showthread.php?tid=570213
EasyDialog include (by Emmet_) - https://github.com/Agneese-Saini/SA-...easydialog.inc
Download
https://github.com/Agneese-Saini/SA-.../inventory.pwn