Gmod Items Trading and Selling System - Script
Items Trading and Selling System is a Gmod addon that will allow your players to trade and sell items among themselves on your server in a secure and optimal way. They will not have to throw the items on the ground anymore. On the security side, a small Lock button will prevent the other party from changing the price, or removing the items at the last moment. When both parties have locked the exchange, they can validate the exchange. So no scamming is possible. It's clean.
The players see in real time what the other has placed in his window, same thing for the price. The aesthetic is customizable from the addon configuration file.
❮
❯
Description of Gmod Items Trading and Selling System
Sommaire :- π Description of the Gmod Items Trading and Selling System addon
- π Trade requests System
- π¬ The methods for initiating a trade request to a user
- π° Ability to Sell or Buy through the MONEY slot
- π The Lock button
- π‘οΈ Security serverside
- 𧩠Gmod inventory compatible addons
- β What type of need can Gmod Items Trading and Selling System meet
- π¬ API associated with Gmod Items Trading and Selling System addon
- π§° Possible changes via the configuration file
π Description of the Gmod Items Trading and Selling System addon
Items Trading and Selling System is a Gmod addon designed to allow your users to trade or sell items from various storage modes. Gmod already uses HL2 inventory for weapons and ammo, I include the possibility to trade from my inventory system (compatibility assured) and my pocket system external to DarkRP, also works with the DarkRP pocket. You will have understood that this addon can run without gamemode like most of my addons.
π Trade requests System
When you send an object exchange request to a user, he will be notified by a window that opens on his screen. They will have the choice to Accept or Decline. You will also have a window to inform you that your request is pending, you can cancel it at any time. If the user refuses then your window will close automatically, if he accepts the exchange window will appear.
π¬ The methods for initiating a trade request to a user
It is possible to choose in the configuration file if the trade should be done only when the players are face to face or not, i.e. they can trade regardless of the distance.
There are 3 methods to launch a trade request:
1- The realistic one and the Roleplay one, you have to aim at the player and write in the chat /trade
2- From the Scoreboard of my design. Click on the player in the scoreboard to see the trader proposal. It will be necessary to have the version 2.6 of Gmod Scoreboard Editable.
3- This method does not exist yet, you will suggest it to me soon enough.
π° Ability to Sell or Buy through the MONEY slot
Originally this addon was just meant to be an item trading system, I added an option (disable if not desired) that allows users to put an amount that will be sent to the trader at the end of the trade, which turns this trading script into also a player to player selling system. So you can also use this script to send money to another player.
How does it work?
During a trade, click on the area where there is money to insert the amount you want to put, the other player will see the amount you put on his side, at the end of the transaction the user will receive this amount.
The compatible money system is the one of DarkRP and the one I designed Gmod Money System + HUD Maker
π The Lock button
The lock function allows you to say that you are ready, this has the effect of blocking any new addition/removal, modification of the price on both sides. Thus preventing one of the two sides to add or remove items or change the price. To confirm the sale both parties will have to have activated the lock to say they are ready. Then the "Validate" button becomes available to complete the exchange.
To be able to validate the exchange the two exchangers will have to lock each one on their side to unlock the validation button.
π‘οΈ Security serverside
On the server side there is a check that allows the user to not be able to place objects that he doesn't have. I've often been confronted on my servers with users modifying the client side to try this kind of cheating method. This will be something you don't have to worry about.
𧩠Gmod inventory compatible addons
The script works well on its own as it allows basic trading and selling of weapons and ammunition, but it works even better with Gmod Inventory System and Gmod Pocket System without DarkRP which allow storing items.
The addon is also compatible with the Pocket of DarkRP.
This script is not designed for: ItemStore, XInventory, DInventory.
β What type of need can Gmod Items Trading and Selling System meet
You are looking for a script to bring a notion of barter to your server.
You are looking for a script to bring a notion of selling between players to your server.
You are looking for a script to allow your users to trade weapons and ammunition with each other on your gamemode.
π¬ API associated with Gmod Items Trading and Selling System addon
If you want to use another method than the /trade command to exchange with the player you are targeting.
Lua functions on the server side:
player1:TradeRequest(player2) = Allows player1 to send a request to player2.
π§° Possible changes via the configuration file
You will have the possibility to customize:
The style and colors
The sound effects.
The distance required to exchange. (Proximity or not)
The type of image you want for the objects (image of the 3D model, image of the object of the spawn menu, or image custome that you will add yourself)
Choose to display the steam avatar or the face of the playermodel in the trade window.
Path: garrysmod/addons/norda_items_trading_addon
- The AddWorkshop function is automatically added to the script server file and can be deactivated from the configuration file. : resource.AddWorkshop( 2890280331 )
- To add gmod workshop resources to your collection : Gmod Items Trading and Selling System [Content Only] | Gmod Workshop
Aim at the player you want to trade with, don't be too far away
Alternatively, if you are using my Scoreboard version 2.6 click on the player from the list of online players. (The trade distance option must be disabled in the configuration file. You can't trade at 300m if you have set 2m as max limit)
cfg.distance_trade = 100 -- 0= Trade distance without limit, 100= Distance you can trade
cfg.avatar_mode = 1 -- 0= Steam Avatar, 1= Playermodel face
cfg.options_trade_money = 1 -- 0= OFF hide Money Button, 1= We can Give Money
cfg.options_weapons = 1 -- 0= OFF hide Weapons Button, 1= We can trade weapons
cfg.options_ammos = 1 -- 0= OFF hide Ammo Button, 1= We can trade ammunitions
cfg.options_inventory_items = 1 -- 0= OFF hide Inventory Button, 1= We can trade items from Norda Inventory
cfg.options_pocket_items = 1 -- 0= OFF hide Pocker Button, 1= We can trade items from Norda Pocket
cfg.options_DarkRP_pocket_items = 1 -- 0= OFF hide PockerDarkRP Button, 1= We can trade items from DarkRP Pocket
cfg.Custom_Fonts="Trebuchet24" -- Custom Fonts
cfg.background_color = Color(0,0,0,150) -- Background color of the negotiation panel
cfg.buttons_color = Color(0,162,232,255) -- Negotiation panel buttons color
cfg.title_color = Color(255,255,255) -- Title Color of trading panel
cfg.txt_color = Color(255,255,255,200)-- Text Color of trading panel
cfg.style_rounded = 4 -- Round the corners
cfg.Items_Blacklist={
norda_pocket=true,
norda_hand=true,
pocket=true,
}
You do not have to have my Gmod Money System. If you don't have it, change the variables below manually from the configuration file.
cfg.money_cur = "$"
cfg.money_icon = Material("ngui/norda_huds/money.png")
Tip to avoid the leak of Gmod Items Trading and Selling System 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?
Creator: Norda Scripts
Sales | 39 |
Published | 2 years |
Last update | |
Version | version 1.9 |
DRM | Yes |
Categories | Gmod addons |
Requierements | Garry's Mod Server |
Languages | π¬π§ π«π· π©πͺ πͺπΈ π·πΊ |
Entities Gameplay Management Allgamemode |