Jump to content
  • 0

Adding guns to Loot Tables


adzvaughan

Question

Hi,

 

I have added some guns to the loot tables and traders. They are in the agme and traders work fine.

 

Here is the table below:

 

 

    assaultrifles[] = {
        {
            "AKS_74_kobra",
            "AKS_74_U",
            "AKS_GOLD",
            "AK_47_M",
            "AK_74",
            "FN_FAL",
            "G36A_camo",
            "G36C",
            "G36C_camo",
            "G36K_camo",
            "G36_C_SD_camo",
            "M16A2",
            "M16A2GL",
            "M16A4_ACG",
            "M4A1",
            "M4A1_Aim",
            "M4A1_AIM_SD_camo",
            "M4A1_HWS_GL_camo",
            "M4A3_CCO_EP1",
            "Sa58P_EP1",
            "Sa58V_CCO_EP1",
            "Sa58V_EP1",
            "Sa58V_RCO_EP1",
            "m8_compact",
            "m8_sharpshooter",
            "m8_carbine",
            "BAF_L85A2_RIS_SUSAT",
            "BAF_L85A2_RIS_Holo",
            "BAF_L85A2_RIS_ACOG",
            "BAF_L85A2_UGL_ACOG",
            "BAF_L85A2_UGL_Holo",
            "BAF_L85A2_UGL_SUSAT",
            "M4A1_HWS_GL_SD_Camo",
            "SCAR_L_CQC_CCO_SD",
            "SCAR_L_CQC",
            "SCAR_L_CQC_Holo",
            "SCAR_L_CQC_EGLM_Holo",
            "SCAR_L_STD_EGLM_RCO",
            "SCAR_L_STD_HOLO",
            "SCAR_L_STD_Mk4CQT",
            "SCAR_H_CQC_CCO",
            "SCAR_H_CQC_CCO_SD",
            "SCAR_H_STD_EGLM_Spect"

        },
        {
            0.03,
            0.02,
            0.01,
            0.02,
            0.02,
            0.02,
            0.03,
            0.03,
            0.03,
            0.03,
            0.03,
            0.03,
            0.02,
            0.01,
            0.03,
            0.03,
            0.01,
            0.01,
            0.03,
            0.02,
            0.02,
            0.02,
            0.03,
            0.02,
            0.02,
            0.03,
            0.02,
            0.02,
            0.02,
            0.02,
            0.02,
            0.02,
            0.01,
            0.03,
            0.03,
            0.03,
            0.03,
            0.03,
            0.03,
            0.03,
            0.03,
            0.01,
            0.01,

        }
    };

 

 

Can anyone tell me what I'm doing wrong? (I'm very new to this)

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Hi,

 

I have added some guns to the loot tables and traders. They are in the agme and traders work fine.

 

Here is the table below:

 

 

    assaultrifles[] = {

        {

            "AKS_74_kobra",

            "AKS_74_U",

            "AKS_GOLD",

            "AK_47_M",

            "AK_74",

            "FN_FAL",

            "G36A_camo",

            "G36C",

            "G36C_camo",

            "G36K_camo",

            "G36_C_SD_camo",

            "M16A2",

            "M16A2GL",

            "M16A4_ACG",

            "M4A1",

            "M4A1_Aim",

            "M4A1_AIM_SD_camo",

            "M4A1_HWS_GL_camo",

            "M4A3_CCO_EP1",

            "Sa58P_EP1",

            "Sa58V_CCO_EP1",

            "Sa58V_EP1",

            "Sa58V_RCO_EP1",

            "m8_compact",

            "m8_sharpshooter",

            "m8_carbine",

            "BAF_L85A2_RIS_SUSAT",

            "BAF_L85A2_RIS_Holo",

            "BAF_L85A2_RIS_ACOG",

            "BAF_L85A2_UGL_ACOG",

            "BAF_L85A2_UGL_Holo",

            "BAF_L85A2_UGL_SUSAT",

            "M4A1_HWS_GL_SD_Camo",

            "SCAR_L_CQC_CCO_SD",

            "SCAR_L_CQC",

            "SCAR_L_CQC_Holo",

            "SCAR_L_CQC_EGLM_Holo",

            "SCAR_L_STD_EGLM_RCO",

            "SCAR_L_STD_HOLO",

            "SCAR_L_STD_Mk4CQT",

            "SCAR_H_CQC_CCO",

            "SCAR_H_CQC_CCO_SD",

            "SCAR_H_STD_EGLM_Spect"

        },

        {

            0.03,

            0.02,

            0.01,

            0.02,

            0.02,

            0.02,

            0.03,

            0.03,

            0.03,

            0.03,

            0.03,

            0.03,

            0.02,

            0.01,

            0.03,

            0.03,

            0.01,

            0.01,

            0.03,

            0.02,

            0.02,

            0.02,

            0.03,

            0.02,

            0.02,

            0.03,

            0.02,

            0.02,

            0.02,

            0.02,

            0.02,

            0.02,

            0.01,

            0.03,

            0.03,

            0.03,

            0.03,

            0.03,

            0.03,

            0.03,

            0.03,

            0.01,

            0.01,

        }

    };

 

 

Can anyone tell me what I'm doing wrong? (I'm very new to this)

If they are in game and they work at the traders then what's the issue? Are they not spawning or what?

Link to comment
Share on other sites

  • 0

Looks to me that at the end is your problem. Should look like this...

               "SCAR_H_STD_EGLM_Spect"
        },

 

               0.01
        }

 

You had an extra line between you item and bracket and the percent chance you had an , and an extra line between item percent chance and bracket. Here's what mine looks like.

 

    assaultrifles[] = {
        {
            "AKS_74_kobra",
            "AKS_74_U",
            "AKS_GOLD",
            "AK_47_M",
            "AK_74",
            "FN_FAL",
            "FN_FAL_ANPVS4",
            "G36A_camo",
            "G36C",
            "G36C_camo",
            "G36K_camo",
            "G36_C_SD_camo",
            "M16A2",
            "M16A2GL",
            "M16A4_ACG",
            "M4A1",
            "M4A1_Aim",
            "M4A1_AIM_SD_camo",
            "M4A1_HWS_GL_camo",
            "M4A3_CCO_EP1",
            "Sa58P_EP1",
            "Sa58V_CCO_EP1",
            "Sa58V_EP1",
            "Sa58V_RCO_EP1",
            "m8_compact",
            "m8_sharpshooter",
            "m8_holo_sd",
            "m8_carbine",
            "m8_tws",
            "m8_carbine_pmc",
            "m8_compact_pmc",
            "m8_tws_sd",
            "m8_CarbineGL",            
            "BAF_L85A2_RIS_SUSAT",
            "BAF_L85A2_RIS_Holo",
            "M4A1_HWS_GL_SD_Camo",
            //new items
            "SCAR_H_CQC_CCO",
            "SCAR_H_CQC_CCO_SD",
            "SCAR_H_STD_EGLM_Spect",
            "SCAR_L_CQC",
            "SCAR_L_CQC_CCO_SD",
            "SCAR_L_CQC_EGLM_Holo",
            "SCAR_L_CQC_Holo",
            "SCAR_L_STD_EGLM_RCO",
            "SCAR_L_STD_EGLM_TWS",
            "SCAR_L_STD_HOLO",
            "SCAR_L_STD_Mk4CQT",
            "SCAR_H_STD_TWS_SD"
        },
        {
            0.05,
            0.05,
            0.01,
            0.05,
            0.05,
            0.03,
            0.01,
            0.05,
            0.05,
            0.05,
            0.05,
            0.03,
            0.05,
            0.02,
            0.01,
            0.05,
            0.04,
            0.01,
            0.01,
            0.04,
            0.02,
            0.04,
            0.02,
            0.04,
            0.03,
            0.04,
            0.02,
            0.05,
            0.02,
            0.04,
            0.03,
            0.04,
            0.02,
            0.05,            
            0.02,
            0.01,
            0.01,
            //new items
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01,
            0.01
        }
    };

Link to comment
Share on other sites

  • 0

assaultrifles[] = {

{

"AKS_74_kobra",

"AKS_74_U",

"AKS_GOLD",

"AK_47_M",

"AK_74",

"FN_FAL",

"G36A_camo",

"G36C",

"G36C_camo",

"G36K_camo",

"G36_C_SD_camo",

"M16A2",

"M16A2GL",

"M16A4_ACG",

"M4A1",

"M4A1_Aim",

"M4A1_AIM_SD_camo",

"M4A1_HWS_GL_camo",

"M4A3_CCO_EP1",

"Sa58P_EP1",

"Sa58V_CCO_EP1",

"Sa58V_EP1",

"Sa58V_RCO_EP1",

"m8_compact",

"m8_sharpshooter",

"m8_carbine",

"BAF_L85A2_RIS_SUSAT",

"BAF_L85A2_RIS_Holo",

"BAF_L85A2_RIS_ACOG",

"BAF_L85A2_UGL_ACOG",

"BAF_L85A2_UGL_Holo",

"BAF_L85A2_UGL_SUSAT",

"M4A1_HWS_GL_SD_Camo",

"SCAR_L_CQC_CCO_SD",

"SCAR_L_CQC",

"SCAR_L_CQC_Holo",

"SCAR_L_CQC_EGLM_Holo",

"SCAR_L_STD_EGLM_RCO",

"SCAR_L_STD_HOLO",

"SCAR_L_STD_Mk4CQT",

"SCAR_H_CQC_CCO",

"SCAR_H_CQC_CCO_SD",

"SCAR_H_STD_EGLM_Spect"

},

{

0.03,

0.02,

0.01,

0.02,

0.02,

0.02,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.02,

0.01,

0.03,

0.03,

0.01,

0.01,

0.03,

0.02,

0.02,

0.02,

0.03,

0.02,

0.02,

0.03,

0.02,

0.02,

0.02,

0.02,

0.02,

0.02,

0.01,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.01,

0.01

}

};

This should work, spot the difference. Hint = , ;)

Link to comment
Share on other sites

  • 0

assaultrifles[] = {

{

"AKS_74_kobra",

"AKS_74_U",

"AKS_GOLD",

"AK_47_M",

"AK_74",

"FN_FAL",

"G36A_camo",

"G36C",

"G36C_camo",

"G36K_camo",

"G36_C_SD_camo",

"M16A2",

"M16A2GL",

"M16A4_ACG",

"M4A1",

"M4A1_Aim",

"M4A1_AIM_SD_camo",

"M4A1_HWS_GL_camo",

"M4A3_CCO_EP1",

"Sa58P_EP1",

"Sa58V_CCO_EP1",

"Sa58V_EP1",

"Sa58V_RCO_EP1",

"m8_compact",

"m8_sharpshooter",

"m8_carbine",

"BAF_L85A2_RIS_SUSAT",

"BAF_L85A2_RIS_Holo",

"BAF_L85A2_RIS_ACOG",

"BAF_L85A2_UGL_ACOG",

"BAF_L85A2_UGL_Holo",

"BAF_L85A2_UGL_SUSAT",

"M4A1_HWS_GL_SD_Camo",

"SCAR_L_CQC_CCO_SD",

"SCAR_L_CQC",

"SCAR_L_CQC_Holo",

"SCAR_L_CQC_EGLM_Holo",

"SCAR_L_STD_EGLM_RCO",

"SCAR_L_STD_HOLO",

"SCAR_L_STD_Mk4CQT",

"SCAR_H_CQC_CCO",

"SCAR_H_CQC_CCO_SD",

"SCAR_H_STD_EGLM_Spect"

},

{

0.03,

0.02,

0.01,

0.02,

0.02,

0.02,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.02,

0.01,

0.03,

0.03,

0.01,

0.01,

0.03,

0.02,

0.02,

0.02,

0.03,

0.02,

0.02,

0.03,

0.02,

0.02,

0.02,

0.02,

0.02,

0.02,

0.01,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.03,

0.01,

0.01

}

};

This should work, spot the difference. Hint = , ;)

I love you, thank you very much.

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