Jump to content

Adding new category in trader - no name in trader menu


Pakus

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?

Link to comment
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 :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...