Jump to content
  • 0
Crazmanian

Vehicle Storage space in Trader menu

Question

Hey i have been looking all day on the forum and the server files and im wondering how to add the storage space next to the trader name. I thought i found it in the cfgvehicle.hpp file but it hasnt seemed to work.

Any ideas ???

Thanks

Share this post


Link to post
Share on other sites

24 answers to this question

Recommended Posts

  • 0

I doubt that it all fits on a trader menu, at least not in lower resolutions.

 

Works fine on top right hint box. Looks something like this.

 

2cwnkl.jpg

 

In player_traderMenu.sqf or player_traderMenuConfig.sqf or what ever it's called

 

Find:

			_header,
			_File

Replace with:

			_header,
			_File,
			_type,
			_afile

Find:

    while {count TraderItemList < 1} do { sleep 1; };
    _item = TraderItemList select _index;

Add below:

	_name = _item select 0;
	_type = _item select 10;
	_afile = _item select 11;

	_theName = getText(configFile >> _type >> _name >> "displayName");
	_image = getText(configFile >> _type >> _name >> "picture");
	
	if(_type == "CfgVehicles") then {
		if (_afile == "trade_backpacks") then {
			_mags = getNumber (configFile >> "CfgVehicles" >> _name >> "transportMaxMagazines");	
			
			hintSilent parseText format ["
				<t align='center' color='#52bf90' shadow='1.5' size='1.75'> %1 </t><br/>
				<img size='6' image='%2'/><br/>
				<t align='center' color='#FFFFFF' size='1.2'> Slots: %3 </t>
				",
				_theName,
				_image,
				_mags
			];
		} else {
			_seats = getNumber (configFile >> _type >> _name >> "transportSoldier");
			_weapons = getNumber (configFile >> _type >> _name >> "transportMaxWeapons");
			_mags = getNumber (configFile >> _type >> _name >> "transportMaxMagazines");
			_packs = getNumber (configFile >> _type >> _name >> "transportMaxBackpacks");
			
			hintSilent parseText format ["
				<t align='center' color='#52bf90' shadow='1.5' size='1.75'> %1 </t><br/>
				<img size='6' image='%2'/><br/>
				<t align='left' color='#FFFFFF' size='1.2'>      Seats: %3 </t><br/>
				<t align='left' color='#FFFFFF' size='1.2'>      Gear: %4/%5/%6 </t>
				",
				_theName,
				_image,
				(_seats + 1),
				_weapons,
				_mags,
				_packs			
			];
		};
	} else {
		_whatIsthis = getText(configFile >> _type >> _name >> "descriptionShort");
		
		hintSilent parseText format ["
			<t align='center' color='#52bf90' shadow='1.5' size='1.75'> %1 </t><br/>
			<img size='6' image='%3'/><br/>
			<t align='center' color='#FFFFFF' size='1.2'> %2 </t>
			",
			_theName,
			_whatIsthis,
			_image
		];
	};

Share this post


Link to post
Share on other sites
  • 0

 

I doubt that it all fits on a trader menu, at least not in lower resolutions.

 

Works fine on top right hint box. Looks something like this.

 

2cwnkl.jpg

 

In player_traderMenu.sqf or player_traderMenuConfig.sqf or what ever it's called

 

Find:

			_header,
			_File

Replace with:

			_header,
			_File,
			_type,
			_afile

Find:

    while {count TraderItemList < 1} do { sleep 1; };
    _item = TraderItemList select _index;

Add below:

	_name = _item select 0;
	_type = _item select 10;
	_afile = _item select 11;

	_theName = getText(configFile >> _type >> _name >> "displayName");
	_image = getText(configFile >> _type >> _name >> "picture");
	
	if(_type == "CfgVehicles") then {
		if (_afile == "trade_backpacks") then {
			_mags = getNumber (configFile >> "CfgVehicles" >> _name >> "transportMaxMagazines");	
			
			hintSilent parseText format ["
				<t align='center' color='#52bf90' shadow='1.5' size='1.75'> %1 </t><br/>
				<img size='6' image='%2'/><br/>
				<t align='center' color='#FFFFFF' size='1.2'> Slots: %3 </t>
				",
				_theName,
				_image,
				_mags
			];
		} else {
			_seats = getNumber (configFile >> _type >> _name >> "transportSoldier");
			_weapons = getNumber (configFile >> _type >> _name >> "transportMaxWeapons");
			_mags = getNumber (configFile >> _type >> _name >> "transportMaxMagazines");
			_packs = getNumber (configFile >> _type >> _name >> "transportMaxBackpacks");
			
			hintSilent parseText format ["
				<t align='center' color='#52bf90' shadow='1.5' size='1.75'> %1 </t><br/>
				<img size='6' image='%2'/><br/>
				<t align='left' color='#FFFFFF' size='1.2'>      Seats: %3 </t><br/>
				<t align='left' color='#FFFFFF' size='1.2'>      Gear: %4/%5/%6 </t>
				",
				_theName,
				_image,
				(_seats + 1),
				_weapons,
				_mags,
				_packs			
			];
		};
	} else {
		_whatIsthis = getText(configFile >> _type >> _name >> "descriptionShort");
		
		hintSilent parseText format ["
			<t align='center' color='#52bf90' shadow='1.5' size='1.75'> %1 </t><br/>
			<img size='6' image='%3'/><br/>
			<t align='center' color='#FFFFFF' size='1.2'> %2 </t>
			",
			_theName,
			_whatIsthis,
			_image
		];
	};

Cant get this to work theres no hint box is there something else i need to do to get the hint boxes?

Share this post


Link to post
Share on other sites
  • 0

No we havent got single currency running and traders im not 100% on but think its hive traders. Best way to tell?

 

Then you are probably not using config traders. So then you have to take player_traderMenuHive.sqf from dayz_code, redirect from compiles and do those same changes to that file.

Share this post


Link to post
Share on other sites
  • 0

We're running Zupa 2.0 (Soul variant 1) and I've made the suggested edits to player_traderMenu.sqf within the custom/gold directory

 

However, I'm not getting the hint window.

 

Here's the file:

http:\\www.pastebin.com/atcctY9V

 

We're running JAEM, which I believe may use a modified hint window, as well as a couple of other mods with custom GUIs, though I don't believe any of those should affect this. 

 

Ideas on why the hint window would be giving me the finger?  We also have Infistar running as well.

Share this post


Link to post
Share on other sites
  • 0
Error in expression <_type = _item select 10;
_afile = _item select 11;
_theName = getText(configFile>
  Error position: <select 11;
_theName = getText(configFile>
  Error Zero divisor
 
Getting this in client.rpt

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...