Jump to content
  • 0

[REQUEST] Sell directly from backpack.


Tricks

Question

Hey guys,

I am gonna put it out there, anyone have the skill to creat a script that enables a player to sell items directly from their backpack? I know their is a sell from truck script, but I don't want to use that one.

Thanks!!

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

To point you in the right direction, there is a command within ArmA2 that returns an array of items in a unit's backpack, namely 'backpackItems' see here

 

You could incorporate this array of items into the sell code for the traders so it will check the backpack for the items and not just the main inventory.

Link to comment
Share on other sites

  • 0

To point you in the right direction, there is a command within ArmA2 that returns an array of items in a unit's backpack, namely 'backpackItems' see here

 

You could incorporate this array of items into the sell code for the traders so it will check the backpack for the items and not just the main inventory.

 

Actually that command was introduced in Arma 3 :P

 

This is what you want to use, I will see what I can do in the next few days but if anyone else wants to do it before me this is what you need

_backpack = getWeaponCargo unitBackpack player;
Link to comment
Share on other sites

  • 0

Actually that command was introduced in Arma 3 :P

 

This is what you want to use, I will see what I can do in the next few days but if anyone else wants to do it before me this is what you need

_backpack = getWeaponCargo unitBackpack player;

Jossy, thank you so much! I look forward to seeing what you come up with.

Link to comment
Share on other sites

  • 0

I've integrated this into Csus's Trade from Vehicle script so keep an eye on http://epochmod.com/forum/index.php?/topic/11931-release-tradefromvehicle-sell-weapons-directly-from-your-vehicle/page-9?hl=%20trade%20%20from%20%20vehicle haven't had a chance to do a lot of testing yet so use at your own risk :)

Hey Jossy, to install your version with the backpack. Should I just follow the steps from the original script but use your files?

Link to comment
Share on other sites

  • 0

Hey Jossy, to install your version with the backpack. Should I just follow the steps from the original script but use your files?

 

Sorry I took so long to find your question, if you had of messaged me I would answer within a day :)

 

In regards to the question though, yes follow the normal instructions, the backpack files will be compatible with the originals, if you still need help PM me!

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...