Home / Gmod Addons Marketplace / Gmod Pocket System without DarkRP


Media
Description πŸ‡¬πŸ‡§ Description πŸ‡«πŸ‡·

Gmod Pocket System without DarkRP - Script


Demonstration Youtube video of Gmod Pocket System without DarkRP

Inspired by the Pocket system of DarkRP, here is a light and minimalist version of my inventory system. It's a Swep that you must own to use. Quickly store whitelisted items with the left click and right click to drop the item where you are looking. Use the Reload key to display your Pocket's inventory.


clean-interface drop-from-panel hud-paint-info quick-access-to-the-wiki style-customisation your-colors-rgb-code gmod-spawnmenu

Maximum image size
Description

Description of Gmod Pocket System without DarkRP

Contents:
  1. πŸ“˜ Description of the Gmod Pocket System without DarkRP addon
  2. πŸŽ’ SWEP Pocket
  3. πŸ•ΉοΈ Give
  4. ❓ What type of need can Gmod Pocket System meet?
  5. 🧩 Useful combination with other scripts?
  6. πŸ“š API associated with this Gmod Pocket addon
  7. πŸ› οΈ Configuration options from the configuration file
  8. ☝️ Why is this pocket system a better alternative to the DarkRP pocket?


πŸ“˜ Description of the Gmod Pocket System without DarkRP addon

Gmod Pocket System without DarkRP has been designed for those who want a simple minimalist storage system. It's a storage system that makes up for the shortcomings of the DarkRP pocket system but can also work without DarkRP, as far as optimization is concerned, it doesn't download the entire contents of the pocket every time you pick up an item, and it's also smaller than my inventory system. Coded independently from any other system you can also make it work without the DarkRP gamemode. So you don't need DarkRP to make it work.

The system has a minimalist database that allows players when they come back to find their pocket on their character with its content.

This script does the job of the pocket you already know. I've made sure that old habits aren't broken.

Unlike my other inventory system, this one is a swep pocket that you can drop with its contents.



πŸŽ’ SWEP Pocket

Gmod Pocket System is a sweep that you can drop with its contents.
A more attractive and intuitive menu will open with the Reload key in a fluid way. With the possibility to bind a key (Default P for Pocket).
The left click will allow you to store inside the objects you are aiming at.
And the right click will allow you to drop the stored objects in the order where you look.

Class name of the weapon : norda_pocket

So if it is not equipped, you will not be able to store or open it.

From the config file you can choose to default it at spawn time. For those who want only certain jobs to spawn with a pocket on DarkRP and not everyone, you will need to add it to the job sweep list in the JobRelated.lua file in the same way as your old pocket system.



πŸ•ΉοΈ Give

An option in the configuration file will allow you to give the pocket to the players when they connect.
You can also distribute it via the jobrelated.lua file or in other ways via the spawnmenu or other.



❓ What type of need can Gmod Pocket System meet?

-Are you looking to replace one by one the DarkRP modules that make up your server? The pocket is one of them.
-You want to correct the optimization problems of the DarkRP pocket ? This one does not correct it, it replaces it completely.
-You want to leave DarkRP but you are looking for a new pocket system that doesn't upset your players' habits with the old pocket ? And that works ?



🧩 Useful combination with other scripts?

The script works well alone. But did you know that it is possible to have a pocket for each character in Gmod Character Creator System.

The items created via Norda Pack Items are automatically added to the whitelist.



πŸ“š API associated with this Gmod Pocket addon

- Client + server side:
Player:GetMaxPocket() = Returns the max storage capacity in the pocket. The max capacity is defined in the configuration file by the variable: cfg.Pocket_max.
player:GetPocketItems() = Return the table of the list of objects stored in the pocket.

- On the server side:
Player:StoreInPocket(class,qt,mdl,clip2) = Allows to store an entity with only the class name of that one.

Player:AddInPocket(ent,quantity) = Store an existing entity on the gmod server map.

Player:DropFromPocket(id) = Drop an item stored in the pocket.

Player:SavePocket() = Force save the pocket



πŸ› οΈ Configuration options from the configuration file
-----CONFIGURATION-----

cfg.OwnerSteamID="STEAM_0:0:000000000000" --If you are the owner and you dont use Admin System put your Steam ID here. Value exemple:---> "STEAM_0:1:125347606"
cfg.USeWorkshopContent=1 --If you dont have a fastdownload you can use workshop content(1 Enable "I want use workshop" / 0 Disable "I prefer use my fastdl")
cfg.notification_stock =1 -- Notify when an object is stored in the inventory
cfg.inv_give_pocket =1 -- Give the 'Pocket' to the players at the spawn
cfg.store_weapons =1 -- 1 = The pocket can store weapons. 0 = The pocket cannot store weapons.

-----Custom SOUND Effect-----
cfg.Sound_Store = "npc/zombie/foot_slide2.wav" -- Sound effect when items is stored
cfg.Sound_Drop = "npc/zombie/foot_slide2.wav" -- Sound effect when items is droped
cfg.Sound_Open = "norda_pocket/pocket_open.mp3" -- Sound effect when the pocket is open
cfg.Sound_Close = "norda_pocket/pocket_close.mp3" -- Sound effect when the pocket is close
cfg.Sound_Button = "npc/zombie/foot_slide2.wav" -- Sound effect when we clic on item in pocket

----------STYLE----------
cfg.Custom_Fonts="Trebuchet24" -- Custom Fonts
cfg.background_color = Color(0,0,0,150) -- Background Color of the pocket Panel
cfg.buttons_color = Color(0,162,232,255) -- Buttons Color of the pocket Panel
cfg.title_color = Color(255,255,255) -- Title Color of the pocket Panel
cfg.txt_color = Color(255,255,255,200)-- Texte Color of the pocket Panel

cfg.pocket_posx = 50 -- Horizontal position of the pocket panel according to the percentage of the resolution. 50% = Center
cfg.pocket_posy = 50 -- Verticale position of the pocket panel according to the percentage of the resolution. 50% = Center
cfg.pocket_size_wide = 47 -- Wide Size of the pocket panel according to the percentage of the resolution.
cfg.pocket_size_tall = 35 -- Tall Size of the pocket panel according to the percentage of the resolution.
cfg.style_rounded = 4 -- Rounding the corners
cfg.slot_size = 62 -- Size in pixels of the cells in the pocket.
cfg.mode_item_image = 0 -- Image display mode of the objects. Choose between the entity image given in the gmod spawnmenu and the 3D model of the object.


☝️ Why is this pocket system a better alternative to the DarkRP pocket?

First of all my pocket is not dependent on the gamemode to work.

Secondly, on a practical level, I don't know if I'm missing an API in DarkRP (feel free to inform me), but the DarkRP pocket is not made to work on a server, you are forced to spawn an object to be able to store it in your pocket as an entity and all its table. That's all I want to avoid and have managed to avoid in my systems.
For the DarkRP pocket we have player:addPocketItem(entity) knowing that every time the pocket is opened the client is constantly downloading its own storage and it's a huge amount of information, you'll observe it with little freeze and accompanied by spikes in the net_graph if you have a lot of items in your darkrp pocket.

With my inventory or pocket nothing like that, we have: player:StoreInPocket("class name here", quantity), we store only the class name and the quantity.
My system transmits the information to the client its two variables directly without spawn anything.
And when the client opens my inventory, it doesn't download its content again. This means that whatever the quantity of objects it will not change anything in terms of bandwidth and CPU whether it is 10 or 1000.
Since it has already received the information in the form of a small text from the last object. And not as an entity table. The net_graph 3 command will allow you to see this and observe the difference which is major.


πŸ”Ή WIKI & F.A.Q πŸ‡¬πŸ‡§
Wiki πŸ‡¬πŸ‡§ Wiki πŸ‡«πŸ‡·

Wiki of Gmod Pocket System without DarkRP

Gmod Pocket System without DarkRP


☰ 1. Installation of Gmod Pocket System without DarkRP
Installation: Download and Unzip the folder norda_pocket_system.zip Install the addon in the addons file of your Gmod server,
Path: garrysmod/addons/norda_pocket_system
☰ 2. Where can I find resources and materials? What is the Gmod Pocket System without DarkRP Workshop id?
Vous trouverez les ressources dans le workshop de Garry's Mod sur Steam. - Gmod Workshop ID of Gmod Pocket System without DarkRP: 2885643265
- The AddWorkshop function is automatically added to the script server file and can be deactivated from the configuration file. : resource.AddWorkshop( 2885643265 )
- To add gmod workshop resources to your collection : Gmod Pocket System without DarkRP [Content Only] | Gmod Workshop
☰ 3. How do I open the Pocket inventory?
Select the Pocket sweep if you have one and press the Reload key. Or the P key for Pocket.
☰ 4. How to give the pocket to everyone at spawn time?
In the configuration file the variable: cfg.spawn_give_pocket, will allow you to define if the pocket is given automatically at spawn time.
1 = Give the pocket at spawn. 0 = OFF
☰ 5. How to change the size of the pocket menu?
In the configuration file the variable : cfg.pocket_size_wide and cfg.pocket_size_tall
will allow you to set the size of the pocket interface, the values are the percentage of the resolution.
☰ 6. How to change the position of the pocket menu?
In the configuration file the variable : cfg.pocket_posx and cfg.pocket_posy
will allow you to set the position of the pocket menu, the values are the percentage of the resolution. 50 means 50% that means center of the screen.
☰ 7. How to change the colors of the pocket menu?
In the configuration file the variable: cfg.background_color + cfg.buttons_color + cfg.title_color + cfg.txt_color
cfg.background_color = Background color of the pocket panel
cfg.buttons_color = Pocket panel buttons color
cfg.title_color = Pocket panel title color
cfg.txt_color = Pocket panel text color
☰ 8. How to change the size of icons of items stored in the pocket?
In the configuration file the variable: cfg.slot_size defines the size in pixel of the slots in the pocket menu.
☰ 9. How to block the addition of all weapons?
In the configuration file the variable : cfg.store_weapons defines the possibility to store weapons (swep) inside the pocket.
cfg.store_weapons =1 -- 1 = The pocket can store weapons. 0 = The pocket cannot store weapons.
☰ 10. How to blacklist an item?
In the configuration file the table: cfg.Items_Blacklist will define all blacklisted objects defined by their class name.

cfg.Items_Blacklist={
norda_pocket=true, // Avoid to store the other pocket in the pocket
}
☰ 11. How to whitelist the items that can be stored in the pocket?
In the configuration file the table: cfg.Items_Whitelist will define all items that can be stored in the pocket. Weapons are included automatically so you don't need to add them.

cfg.Items_Whitelist={
// HL2 EXAMPLE ITEMS
item_battery =true,
item_healthkit =true,
item_healthvial =true,
// HL2 EXAMPLE AMMOS
item_ammo_357 =true,
item_ammo_ar2 =true,
item_ammo_ar2_altfire =true,
item_box_buckshot =true,
item_ammo_smg1 =true,
item_ammo_pistol =true,
}
☰ 12. How to modify the sound effects of the pocket?
In the configuration file the variables: cfg.Sound_Store + cfg.Sound_Drop + cfg.Sound_Open + cfg.Sound_Close + cfg.Sound_Button
Will play sounds specific to a type of action linked to the pocket.

cfg.Sound_Store = Sound effect when objects are stored.
cfg.Sound_Drop = Sound effect when objects are dropped.
cfg.Sound_Open = Sound effect when the pocket is opened
cfg.Sound_Close = Sound effect when pocket is closed
cfg.Sound_Button = Sound effect when clicking on an object in the pocket.
☰ 13. What is the name of the API to see the table / list of items stored in the pocket?
player:GetPocketItems() = Returns the table of the items stored in the user's pocket.
Tips

Tip to avoid the leak of Gmod Pocket System without DarkRP installed on your Garry's Mod server: How avoid the Leak of your Gmod scripts
How Install an addon on Gmod? : How install an addon on Gmod
How Publish an addon on the Gmod workshop? : Documentation how create a content pack to publish on the workshop?

Gmod Addon


πŸ“₯ Download 1.8


🎫 Open Ticket
⛔️ Sorry, you are not connected


avatar-76561198033784269

Creator: Norda Scripts

Sales :24
Published :1 year
Last update :
Version :version 1.8
DRM :Yes
Categories : Gmod addons
Requierements : Garry's Mod Server
Languages : πŸ‡¬πŸ‡§ πŸ‡«πŸ‡· πŸ‡©πŸ‡ͺ πŸ‡ͺπŸ‡Έ πŸ‡·πŸ‡Ί
Tags :
Entities Allgamemode