Jump to content
Sign in to follow this  
Pakus

Adding new category in trader - no name in trader menu

Recommended Posts

Hi guys

I am adding a new category of weapons in the trader and I have a problem.

First I have defined the components of the category in weapons.hpp.

class Category_80 {

class Igla {type = "trade_weapons";buy[] = {10000,"worth"};sell[] = {6000,"worth"};};
class Stinger {type = "trade_weapons";buy[] = {10000,"worth"};sell[] = {6000,"worth"};};
class Strela {type = "trade_weapons";buy[] = {10000,"worth"};sell[] = {6000,"worth"};};
class Javelin {type = "trade_weapons";buy[] = {10000,"worth"};sell[] = {6000,"worth"};};
class M136 {type = "trade_weapons";buy[] = {5000,"worth"};sell[] = {2000,"worth"};};
class RPG18 {type = "trade_weapons";buy[] = {5000,"worth"};sell[] = {2000,"worth"};};
class RPG7V {type = "trade_weapons";buy[] = {5000,"worth"};sell[] = {2000,"worth"};};

};


Then I added the category to the corresponding seller in chernarus11.sqf:


/***************Weapons*********/
menu_Sniper1_DZ = [
    [[localize "STR_EPOCH_TRADER_CATEGORY_AAAT",80],[localize "STR_EPOCH_TRADER_CATEGORY_ATTACHMENTS",12],[localize "STR_EPOCH_TRADER_CATEGORY_PISTOLS",13],[localize "STR_EPOCH_TRADER_CATEGORY_SUBMACHINEGUNS",14],[localize "STR_EPOCH_TRADER_CATEGORY_SINGLESHOT",15],[localize "STR_EPOCH_TRADER_CATEGORY_ASSAULTRIFLES",16],[localize "STR_EPOCH_TRADER_CATEGORY_SNIPERRIFLES",17],[localize "STR_EPOCH_TRADER_CATEGORY_LIGHTMACHINEGUNS",18]],
    [],
    "neutral"
];

Everything works, the weapons can be bought, but in the trader menu the category appears without a name, empty.

I need to define the category somewhere, right? but I can't find where after a couple of hours.

can you help me please?

Share this post


Link to post
Share on other sites

Right on target, thank you very much Graham, I owe you a beer.

The solution is as simple as adding a new package to stringtable.xml, and adding as many categories as you like.

<Package name="CUSTOM">
        <Key ID="STR_CUSTOM_AA">
            <English>AA Weapon</English>
            <French>AA Arme</French>
            <German>AA Wafe</German>
            <Russian>зенитный пистолет</Russian>
            <Spanish>Armas Antiaereas</Spanish>
        </Key>
        ...
    </Package>

It works perfect, you're a crack Graham.

Regards
Fran

P.S. For beer you will have to come on vacation to Spain :)

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
Reply to this topic...

×   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...
Sign in to follow this  

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...