Jump to content
  • 0

How to sell items in bulk?


Link

Question

So one of my friends was asking if it was possible to sell items at a wholesaler in bulk, I think I have seen this on a few servers I have played on in the past and I was wonderinf if anyone was able to explain to me how I could go about achieving this? e.g. sell 10 cinderblocks in a pack at a time.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Using configtraders:

qty = X;

while X is the # of items you sell for the specified price

 

Using DB traders:

[1,"itemCinderblock"] while the 1 is the # of cinderblocks you sell

 

What I mean is, can you sell say 10 cinderblocks during one transaction?

Link to comment
Share on other sites

  • 0

What I mean is, can you sell say 10 cinderblocks during one transaction?

 

Using the above, yes. I believe it also limits any cinderblock sale to quantities of 10 (can't sell singles anymore - not 100% sure though). Alternatively, you could supplement the trade menu with a scroll menu for bulk sell options. This way, you have both sell methods available. I had bulk purchasing working on my old server...never got around to adding bulk sell, but I imagine it's not much different. Don't have access to my files right now, but I can post what I had when I get home. It's very simple, just a quick edit to server_traders.sqf

Link to comment
Share on other sites

  • 0

Here's what I had for one of the wholesalers on Napf - server_traders.sqf:

// West Wholesaler
menu_TK_Special_Forces_MG_EP1 = [
[["Wholesale",636]],
[
["Cinderblocks","ItemBriefcase100oz",10,1,"buy","Briefcase (x1)","Cinderblocks (x10)",101]
],
"neutral"
];

Cost is 1 briefcase for 10 cinderblocks in one purchase. I might have the 'sell' version floating around here somewhere, need to look.

Link to comment
Share on other sites

  • 0

Here's what I had for one of the wholesalers on Napf - server_traders.sqf:

// West Wholesaler
menu_TK_Special_Forces_MG_EP1 = [
[["Wholesale",636]],
[
["Cinderblocks","ItemBriefcase100oz",10,1,"buy","Briefcase (x1)","Cinderblocks (x10)",101]
],
"neutral"
];

Cost is 1 briefcase for 10 cinderblocks in one purchase. I might have the 'sell' version floating around here somewhere, need to look.

Thanks. Yeah if you could find that version that I would appreciate it ;)

Link to comment
Share on other sites

  • 0

Here's mine if you're interested.

// Wholesaler
menu_RU_Citizen1 = [
	[["Wholesale",636]],
	[
	["CinderBlocks","ItemBriefcase100oz",20,1,"buy","Briefcase 100oz","Cinder Blocks",101],
	["MortarBucket","ItemBriefcase100oz",20,1,"buy","Briefcase 100oz","Mortar Buckets",101],
	["ItemPole","ItemGoldBar10oz",100,2,"buy","Gold Bar 10oz","Metal Poles",101],
	["ItemTankTrap","ItemBriefcase100oz",100,1,"buy","Briefcase 100oz","Tank Trap Kits",101],
	["FoodCanBakedBeans","ItemGoldBar10oz",100,2,"buy","Gold Bar 10oz","Baked Beans",101],
	["ItemSodaPepsi","ItemGoldBar10oz",100,2,"buy","Gold Bar 10oz","Pepsi",101],
	["ItemAntibiotic","ItemGoldBar10oz",50,6,"buy","Gold Bar 10oz","Antibiotics",101],
	["ItemBandage","ItemGoldBar10oz",50,1,"buy","Gold Bar 10oz","Bandages",101],
	["ItemBloodbag","ItemGoldBar10oz",50,1,"buy","Gold Bar 10oz","Bloodbags",101],
	["ItemEpinephrine","ItemGoldBar10oz",50,1,"buy","Gold Bar 10oz","Epi Pens",101],
	["ItemMorphine","ItemGoldBar10oz",50,1,"buy","Gold Bar 10oz","Morphine",101],
	["ItemPainkiller","ItemGoldBar10oz",50,1,"buy","Gold Bar 10oz","Painkillers",101]
	],
	"neutral"
];
Link to comment
Share on other sites

  • 0

No.

 

Go into your server_traders.sqf. 

Search the trader that you want to edit, so in example the Hero Trader.

This is the piece of code of the hero trader:

menu_RU_Functionary1 = [ // Classname
[["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]], // Trader TID's
[], // This is the thing they are talking about. Add it into here.
"hero"
];

You see that [],? That's where you add it. So it should look like this:

menu_RU_Functionary1 = [
[["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]],
[
["CinderBlocks","ItemBriefcase100oz",20,1,"buy","Briefcase 100oz","Cinder Blocks",101] // Add a comma on the end if you have more entries (array)
],
"hero"
];
Link to comment
Share on other sites

  • 0

 

No.

 

Go into your server_traders.sqf. 

Search the trader that you want to edit, so in example the Hero Trader.

This is the piece of code of the hero trader:

menu_RU_Functionary1 = [ // Classname
[["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]], // Trader TID's
[], // This is the thing they are talking about. Add it into here.
"hero"
];

You see that [],? That's where you add it. So it should look like this:

menu_RU_Functionary1 = [
[["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]],
[
["CinderBlocks","ItemBriefcase100oz",20,1,"buy","Briefcase 100oz","Cinder Blocks",101] // Add a comma on the end if you have more entries (array)
],
"hero"
];

Yeah, but how is it possible to do it in the database instead with the code I provided, could you show me an example of what a single line in the database selling multiple items would look like?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...