Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies and more


Help! Gun problems!


JojiLi

Recommended Posts

Hi! I was attempting to add weapons to my server by adding these lines vvv
 

class rebel {
        name = "Mohammed's Jihadi Shop";
        side = "civ";
        license = "rebel";
        level[] = { "", "", -1, "" , "" , "" , "" , "" , "" };
        items[] = {
            { "arifle_TRG20_F", "", 240, 90 },
            { "arifle_Katiba_F", "", 2000, 90 },
            { "srifle_DMR_01_F", "", 2000, -1 },
            { "arifle_SDAR_F", "", 100, 10 },
{ "srifle_GM6_F", "", 3500, 500 },
{ "arifle_MXC_F", "", 1500, 90 },l
{ "arifle_MX_F", "", 2000, 90 },
{ "arifle_MX_SW_F", "", 2200, 350 },
{ "arifle_MXM_F", "", 2000, 90 }
        };
 
When before it was like this

class rebel {
        name = "Mohammed's Jihadi Shop";
        side = "civ";
        license = "rebel";
        level[] = { "", "", -1, ""  };
        items[] = {
            { "arifle_TRG20_F", "", 240, 90 },
            { "arifle_Katiba_F", "", 2000, 90 },
            { "srifle_DMR_01_F", "", 2000, -1 },
            { "arifle_SDAR_F", "", 100, 10 },
        };

 

And my server doesnt accept them! I dont know why Im not the best at this so I know I did it wrong (and I have backups) But I want this to work!!! Please help!
(for info this is what each line is for) vvvv
 

Format:
*        level: ARRAY (This is for limiting items to certain things)
*            0: Variable to read from
*            1: Variable Value Type (SCALAR / BOOL / EQUAL)
*            2: What to compare to (-1 = Check Disabled)
*            3: Custom exit message (Optional)
*
*    items: { Classname, Itemname, BuyPrice, SellPrice }
*
*    Itemname only needs to be filled if you want to rename the original object name.
*
*    Weapon classnames can be found here: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons
*    Item classnames can be found here: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Items

Share this post


Link to post
Share on other sites

Try this. 

 

 

 

class rebel {
        name = "Mohammed's Jihadi Shop";
        side = "civ";
        license = "rebel";
        level[] = { "", "", -1, "" };
        items[] = {
            { "arifle_TRG20_F", "", 240, 90 },
            { "arifle_Katiba_F", "", 2000, 90 },
            { "srifle_DMR_01_F", "", 2000, -1 },
            { "arifle_SDAR_F", "", 100, 10 },
            { "srifle_GM6_F", "", 3500, 500 },
            { "arifle_MXC_F", "", 1500, 90 },
            { "arifle_MX_F", "", 2000, 90 },
            { "arifle_MX_SW_F", "", 2200, 350 },
            { "arifle_MXM_F", "", 2000, 90 }
        };

 

 

 

On your level array you had extras added level[] = { "", "", -1, "" , "" , "" , "" , "" , "" }; There should only be 4 in the array just as you posted.

 

Format:
*        level: ARRAY (This is for limiting items to certain things)
*            0: Variable to read from
*            1: Variable Value Type (SCALAR / BOOL / EQUAL)
*            2: What to compare to (-1 = Check Disabled)
*            3: Custom exit message (Optional)
 
                0   1   2   3
level[] = { "", "", -1, "" };

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