Jump to content
R5th

Vehicle Inventory to clipboard

Recommended Posts

I'm trying to get vehicle inventory to clipboard.

So far manage to get each item by using this separate vehicle init on Eden editor,
 

Spoiler

 

copyToClipboard str getItemCargo this;

copyToClipboard str getWeaponCargo this;

copyToClipboard str getMagazineCargo this;

copyToClipboard str getAmmoCargo this;

 

 

Question is how to simplify all those code into 1.

I've tried put all those code into vehicle init on Eden editor but only 1 code that manage to be copied on clipboard, the rest aren't.

Share this post


Link to post
Share on other sites

copyToClipboard str (getItemCargo this + getWeaponCargo this + ... + ...);

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, sarogahtyp said:

copyToClipboard str (getItemCargo this + getWeaponCargo this + ... + ...);

 

Not working

Spoiler

clipboardiniterror.jpg

 

Share this post


Link to post
Share on other sites

Try this way:

_text1 = str (getItemCargo this);
_text2 = str (getWeaponCargo this);
_text3 = str (getMagazineCargo this);
_text4 = str (getAmmoCargo this);
copyToClipboard ("Items: " + _text1 + "; Weapons: " + _text2 + "; Magazines: " + _text3 + "; Ammo: " + _text4);

 

  • Like 1

Share this post


Link to post
Share on other sites

I made a mistake by putting this code

getAmmoCargo

which intended for vehicle ammo.

 

Anyway, this code works

copyToClipboard str (getWeaponCargo this + getMagazineCargo this + getItemCargo this + getBackpackCargo this);

But the amount of items/weapons not shown correctly on the pasted clipboard.

Share this post


Link to post
Share on other sites
15 minutes ago, Ibragim A said:

Try this way:


_text1 = str (getItemCargo this);
_text2 = str (getWeaponCargo this);
_text3 = str (getMagazineCargo this);
_text4 = str (getAmmoCargo this);
copyToClipboard ("Items: " + _text1 + "; Weapons: " + _text2 + "; Magazines: " + _text3 + "; Ammo: " + _text4);

 

This code awesome and well organized!

Easy to separate the items!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×