[FilterScript] Inventory & Items - Textdraw menu
#1

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:
  • 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.
Creating items guide
  • 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!
You can modify menu from this code:
PHP Code:
// Settings
enum
{
    
BACKGROUND 1263615688,
    
LEFT_BACKGROUND 1853316296,
    
RIGHT_BACKGROUND 1853316296,
    
SELECTED 0xd63417BB,
    
FONT 1,
    
MAX_PLAYER_ITEMS 10 // maximum = 15
};
// 
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
Reply
#2

Add MySQL system And add ready stuff ( backpacks, all weapons (m4, deagle ...), bullet system, armor system, food and drinks )

Good work by the way.
Reply
#3

Great, this just gave me an idea
Reply
#4

Nice.
Reply
#5

Quote:
Originally Posted by Max_Andolini
View Post
Add MySQL system And add ready stuff ( backpacks, all weapons (m4, deagle ...), bullet system, armor system, food and drinks )

Good work by the way.
You have the item guide in the thread "Creating items guide". Its so easy to create items with that, that's your ready stuff. And this is just a prototype sort of, you have to modify it to fulfill your gamemode needs.

And i made this for a hunger games mode which doesn't require saving and loading. Anyways you can easily modify it with MySQL or SQLite i guess.
Reply
#6

Finally! i was thinking before that gammix will make inventory & items textdraw now you made it. anyways keep it up.
Reply
#7

it's seems like Valve's weapons' menu wow
Reply
#8

Excellent work, however, as always!
Reply
#9

Quote:
Originally Posted by RxErT
View Post
it's seems like Valve's weapons' menu wow
Yea! The color is same!
Reply
#10

WOW! Best FS I've seen!
Reply
#11

This is too class! Incredible job!
Reply
#12

PUBG
Well made!
Reply
#13

How do I change the textdraw color?
Reply
#14

Quote:
Originally Posted by Dice_
Посмотреть сообщение
How do I change the textdraw color?
You have to change the color when the textdraw is made, check OnFilterScriptInit.

I am working on an update with couple changes and new feature(s), which will include changeing color, font etc.
Reply
#15

Good Job.
Reply
#16

Very nice one, +rep, 5 stars, keep the work up
BTW whats the textdraw filterscript you using ?
Reply
#17

Quote:
Originally Posted by HoussemGaming
Посмотреть сообщение
BTW whats the textdraw filterscript you using ?
https://sampforum.blast.hk/showthread.php?tid=406833
Reply
#18

Very good this inventory, I tested here this great congratulations!
Reply
#19

Updated
- Now you can modify menu a bit from the following code:
PHP код:
// Settings
enum
{
    
BACKGROUND 1263615688,
    
LEFT_BACKGROUND 1853316296,
    
RIGHT_BACKGROUND 1853316296,
    
SELECTED 0xd63417BB,
    
FONT 1,
    
MAX_PLAYER_ITEMS 10 // maximum = 15
};
// 
- Scrollbar has been fixed.
Reply
#20

Nice work I like the design you did on it
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)