![]() |
Trade System
5 Attachment(s)
A trading system using a GUI that I was working on last night.
Create a new weapon called "Trade System" and place what's in the text-document inside. Both parties need the weapon to work correctly. Chat "/trade [communityname]" to ask if [communityname] wants to trade (they have 20 seconds to respond). Chat "/tradeaccept" to accept a requested trade. Chat "/tradedecline" to decline a requested trade There's not an "unaccept" function. This works for all weapon NPCs besides player-hidden ones (starts with "-") and Trade System, Bow, Fireball, Nukeshot, Bomb, Joltbomb, and Superbomb. If you want to change that go to the addItem() function, find the GuiTextListCtrl, and add/remove others. If you want to change this to another item system (MUDLib, SQLite, etc) or add to what can be traded, go to the addItem() function, find the GuiTextListCtrl, and load the items. Then also go to the server side of the script where cmd is donetrade and add/remove the items how you would normally. The same goes for currency, except the function is addGralat(). |
The script looks good, but your use of with() blocks for finding players is awful :cry:.
Anyway, can you post some screenshots? |
Show screens! :)
Should of used this.name, instead of a hard-coded weapon name so they aren't forced to use Trade System as a weapon name. Have you attempted to glitch/dupe using your system? That's a really important factor that separates a good trade system from a bad one. |
Quote:
I haven't, no. Sorry about the JPEG. |
Its a very good system bro. :)
|
I just took another look at the code, and noticed a few things...
|
Quote:
This script is not safe and is not safe for server use. |
Quote:
I changed it to use booleans in my last edit. I had it using them before but I was having trouble getting the function checkBothAccept to work so I was trying a bunch of different things, and I forgot to change it back. Quote:
|
1 Attachment(s)
I can't update the original post (or my last), so here's an updated version for the checks in donetrade. It will check before adding or removing anything.
|
i like it :P hehe
|
Quote:
PHP Code:
|
Quote:
|
| All times are GMT +2. The time now is 02:41 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.