Inventory & Items - Textdraw menu -
Gammix - 06.07.2017
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
Re: Inventory & Items - Textdraw menu -
Max_Andolini - 06.07.2017
Add MySQL system And add ready stuff ( backpacks, all weapons (m4, deagle ...), bullet system, armor system, food and drinks )
Good work by the way.
Re: Inventory & Items - Textdraw menu -
Eoussama - 06.07.2017
Great, this just gave me an idea
Re: Inventory & Items - Textdraw menu -
coool - 06.07.2017
Nice.
Re: Inventory & Items - Textdraw menu -
Gammix - 06.07.2017
Quote:
Originally Posted by Max_Andolini
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.
Re: Inventory & Items - Textdraw menu -
DonaldDuck - 06.07.2017
Finally! i was thinking before that gammix will make inventory & items textdraw
now you made it. anyways keep it up.
Re: Inventory & Items - Textdraw menu -
RxErT - 06.07.2017
it's seems like Valve's weapons' menu wow
Re: Inventory & Items - Textdraw menu -
Marmeladova - 06.07.2017
Excellent work, however, as always!
Re: Inventory & Items - Textdraw menu -
Gammix - 06.07.2017
Quote:
Originally Posted by RxErT
it's seems like Valve's weapons' menu wow
|
Yea! The color is same!
Re: Inventory & Items - Textdraw menu -
ajam123 - 06.07.2017
WOW! Best FS I've seen!
Re: Inventory & Items - Textdraw menu -
MrAjusshi - 06.07.2017
This is too class! Incredible job!
Re: Inventory & Items - Textdraw menu -
SteSte - 07.07.2017
PUBG
Well made!
Re: Inventory & Items - Textdraw menu -
Fairuz - 07.07.2017
How do I change the textdraw color?
Re: Inventory & Items - Textdraw menu -
Gammix - 07.07.2017
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.
Re: Inventory & Items - Textdraw menu -
MarkNelson - 07.07.2017
Good Job.
Re: Inventory & Items - Textdraw menu -
HoussemGaming - 07.07.2017
Very nice one, +rep, 5 stars, keep the work up
BTW whats the textdraw filterscript you using ?
Re: Inventory & Items - Textdraw menu -
Gammix - 07.07.2017
Quote:
Originally Posted by HoussemGaming
BTW whats the textdraw filterscript you using ?
|
https://sampforum.blast.hk/showthread.php?tid=406833
Re: Inventory & Items - Textdraw menu -
Swinte - 08.07.2017
Very good this inventory, I tested here this great congratulations!
Re: Inventory & Items - Textdraw menu -
Gammix - 08.07.2017
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.
Re: Inventory & Items - Textdraw menu -
PT - 09.07.2017
Nice work I like the design you did on it