DarkRP 2.4.2 Problem

On DarkRP 2.4.2 I installed Mad Cow’s Weapon Pack and then went into DarkRP/gamemode/addentities.lua to make a new Job that sells said weapons. When I was done and started up the server to test everything but when I hit F4 and went to the entities/weapons tab there was nothing under the Entities category, no matter what job I tried, but when I removed some of the weapons from the code it worked. Have I hit some sort of limit? If so, is there any way to raise it?

Can you give us your code


AddCustomShipment("Desert eagle", "models/weapons/w_pist_deagle.mdl", "weapon_deagle2", 215, 10, true, 215, false, {TEAM_GUN})
AddCustomShipment("Fiveseven", "models/weapons/w_pist_fiveseven.mdl", "weapon_fiveseven2", 200, 10, true, 205, false, {TEAM_GUN})
AddCustomShipment("USP Pistol", "models/weapons/w_pist_usp.mdl", "weapon_mad_usp", 150, 10, true, 200, false, {TEAM_GUN})
AddCustomShipment("Glock Pistol", "models/weapons/w_pist_glock18.mdl", "weapon_mad_glock", 185, 10, true, 215, false, {TEAM_GUN})
AddCustomShipment("p228 Pistol", "models/weapons/w_pist_p228.mdl", "weapon_mad_p228", 190, 10, true, 225, false, {TEAM_GUN})

AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_ak472", 2450, 10, false, nil, false, {TEAM_HGUN}) 
AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_mp52", 2200, 10, false, nil, false, {TEAM_HGUN}) 
AddCustomShipment("M4", "models/weapons/w_rif_m4a1.mdl", "weapon_m42", 2450, 10, false, nil, false, {TEAM_HGUN}) 
AddCustomShipment("Mac 10", "models/weapons/w_smg_mac10.mdl", "weapon_mac102", 2150, 10, false, nil, false, {TEAM_HGUN}) 
AddCustomShipment("Pump shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_pumpshotgun2", 1750, 10, false, nil, false, {TEAM_HGUN}) 
AddCustomShipment("Sniper rifle", "models/weapons/w_snip_g3sg1.mdl", "ls_sniper", 3750, 10, false, nil, false, {TEAM_HGUN}) 

AddCustomShipment("Cocaine", "models/cocn.mdl", "durgz_cocaine", 7000, 10, false, 150,false, {TEAM_DDEALER})
AddCustomShipment("Heroine", "models/katharsmodels/syringe_out/syringe_out.mdl", "durgz_heroine", 7000, 10, false, 10,false, {TEAM_DDEALER})
AddCustomShipment("LSD", "models/smile/smile.mdl", "durgz_lsd", 7000, 10, false, 50,false, {TEAM_DDEALER})
AddCustomShipment("Mushroom", "models/ipha/mushroom_small.mdl", "durgz_mushroom", 7000, 10, false, 50,false, {TEAM_DDEALER})
AddCustomShipment("Weed", "models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl", "durgz_weed", 7000, 10, false, 150,false, {TEAM_DDEALER})
AddCustomShipment("PCP", "models/marioragdoll/Super Mario Galaxy/star/star.mdl", "durgz_pcp", 7000, 10, false, 200,false, {TEAM_DDEALER})
AddCustomShipment("Water", "models/drug_mod/the_bottle_of_water.mdl", "durgz_water", 100, 15, false, 10,false, {TEAM_DDEALER})

AddCustomShipment("JBomb", "models/weapons/w_jb.mdl", "weapon_jihadbomb", 2000, 10, false, 150, false, {TEAM_TERRORIST})
AddCustomShipment("Rape", "models/weapons/w_c4.mdl", "weapon_rape", 1000, 10, false, 200, false, {TEAM_CREEP})
AddCustomShipment("C4", "models/weapons/w_c4.mdl", "weapon_mad_c4", 1500, 10, false, 300, false, {TEAM_TERRORIST})
AddCustomShipment("Door Charge", "models/weapons/w_slam.mdl", "weapon_mad_charge", 1250, 10, false, 250, false, {TEAM_TERRORIST})
AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "weapon_mad_knife", 750, 12, false, 100, false, {TEAM_GUN})


AddCustomShipment("Famas Assault Rifle", "models/weapons/w_rif_famas.mdl", 1500, 10, false, 200, false {TEAM_HGUN2})
AddCustomShipment("AUG Assault Rifle", "models/weapons/w_rif_aug.mdl", 1650, 10, false, 215, false {TEAM_HGUN2})
AddCustomShipment("AK47 Assault Rifle", "models/weapons/w_rif_ak47", 1400, 10, false, 210, false {TEAM_HGUN2})
AddCustomShipment("TMP SMG", "models/weapons/w_smg_tmp.mdl", "weapon_mad_tmp", 1200, 10, false, 190, false {TEAM_HGUN2})
AddCustomShipment("P90 SMG", "models/weapons/w_smg_p90.mdl", "weapon_mad_p90", 1100, 10, false, 175, false {TEAM_HGUN2})
AddCustomShipment("UMP SMG", "models/weapons/w_smg_ump.mdl", "weapon_mad_ump", 1300, 10, false, 190, false {TEAM_HGUN2})
AddCustomShipment("Scout Sniper", "models/weapons/w_snip_scout.mdl", "weapon_mad_scout", 1300, 10, false, 200, false {TEAM_HGUN2})
AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "weapon_mad_awp", 1350, 10, false, 210, false {TEAM_HGUN2})
AddCustomShipment("SPAS-12", "models/weapons/w_shotgun.mdl", "weapon_mad_spas", 1250, 10, false, 275, false, {TEAM_HGUN2})

AddCustomShipment("Alyx Gun", "models/weapons/w_alyx_gun_2.mdl", "weapon_mad_alyxgun", 1000, 10, false, 150, false {TEAM_ETC})
AddCustomShipment("Incedinary Grenade", "models/weapons/w_eq_smokegrenade.mdl", "weapon_mad_incedinary", 1100, 10, false, 225, false, {TEAM_ETC})
AddCustomShipment("HE Grenade", "models/weapons/w_eq_fraggrenade.mdl", "weapon_mad_grenade", 1100, 10, false, 175, false, {TEAM_ETC})
AddCustomShipment("Smoke Grenade", "models/weapons/w_eq_smokegrenade.mdl", "weapon_mad_smoke", 1000, 10, false, 150, false, {TEAM_ETC})
AddCustomShipment("Flash Bang", "models/weapons/w_eq_flashbang.mdl", "weapon_mad_flash", 1075, 10, false, 200, false, {TEAM_ETC})
AddCustomShipment("XM1014", "models/weapons/w_shot_xm1014.mdl", "weapon_mad_xm1014", 1550, 10, false, 300, false {TEAM_ETC})
AddCustomShipment("M249", "models/weapons/w_mach_m249para.md", "weapon_mad_m249", 1750, 10, false, 430, false {TEAM_ETC})
AddCustomShipment("SG550 Sniper Rifle", "models/weapons/w_snip_sg550.mdl", "weapon_mad_sg550", 1400, 10, false, 230, false {TEAM_ETC})

I made 3 different jobs because I thought the limit was just per job, but I guess not (ignore TEAM_DDEALER, thats for DurgzMod)

You don’t put jobs in addentities.lua I don’t know if this is a typo or not but jobs go into shared.lua not entities.

I put the Jobs in shared, don’t worry

I have some stuff you need to check:

  1. Are you putting your code under where it says you need to? (bottom of the file)

  2. Are you using the latest SVN Version?

Yes
Yes

this might fix it however i’m not sure:

i’ll give you an example;


AddCustomShipment("Famas Assault Rifle", "models/weapons/w_rif_famas.mdl", 1500, 10, false, 200, false {TEAM_HGUN2})

the 200 is not supposed to be there, since you put false after the 10, that means that it will not sell single weapons because you set it to false. The 200 is supposed to be nil, because thats the price for single weapons, and you set single weapons to false.

TL;DR

change these:



AddCustomShipment("JBomb", "models/weapons/w_jb.mdl", "weapon_jihadbomb", 2000, 10, false, 150, false, {TEAM_TERRORIST})
AddCustomShipment("Rape", "models/weapons/w_c4.mdl", "weapon_rape", 1000, 10, false, 200, false, {TEAM_CREEP})
AddCustomShipment("C4", "models/weapons/w_c4.mdl", "weapon_mad_c4", 1500, 10, false, 300, false, {TEAM_TERRORIST})
AddCustomShipment("Door Charge", "models/weapons/w_slam.mdl", "weapon_mad_charge", 1250, 10, false, 250, false, {TEAM_TERRORIST})
AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "weapon_mad_knife", 750, 12, false, 100, false, {TEAM_GUN})


AddCustomShipment("Famas Assault Rifle", "models/weapons/w_rif_famas.mdl", 1500, 10, false, 200, false {TEAM_HGUN2})
AddCustomShipment("AUG Assault Rifle", "models/weapons/w_rif_aug.mdl", 1650, 10, false, 215, false {TEAM_HGUN2})
AddCustomShipment("AK47 Assault Rifle", "models/weapons/w_rif_ak47", 1400, 10, false, 210, false {TEAM_HGUN2})
AddCustomShipment("TMP SMG", "models/weapons/w_smg_tmp.mdl", "weapon_mad_tmp", 1200, 10, false, 190, false {TEAM_HGUN2})
AddCustomShipment("P90 SMG", "models/weapons/w_smg_p90.mdl", "weapon_mad_p90", 1100, 10, false, 175, false {TEAM_HGUN2})
AddCustomShipment("UMP SMG", "models/weapons/w_smg_ump.mdl", "weapon_mad_ump", 1300, 10, false, 190, false {TEAM_HGUN2})
AddCustomShipment("Scout Sniper", "models/weapons/w_snip_scout.mdl", "weapon_mad_scout", 1300, 10, false, 200, false {TEAM_HGUN2})
AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "weapon_mad_awp", 1350, 10, false, 210, false {TEAM_HGUN2})
AddCustomShipment("SPAS-12", "models/weapons/w_shotgun.mdl", "weapon_mad_spas", 1250, 10, false, 275, false, {TEAM_HGUN2})

AddCustomShipment("Alyx Gun", "models/weapons/w_alyx_gun_2.mdl", "weapon_mad_alyxgun", 1000, 10, false, 150, false {TEAM_ETC})
AddCustomShipment("Incedinary Grenade", "models/weapons/w_eq_smokegrenade.mdl", "weapon_mad_incedinary", 1100, 10, false, 225, false, {TEAM_ETC})
AddCustomShipment("HE Grenade", "models/weapons/w_eq_fraggrenade.mdl", "weapon_mad_grenade", 1100, 10, false, 175, false, {TEAM_ETC})
AddCustomShipment("Smoke Grenade", "models/weapons/w_eq_smokegrenade.mdl", "weapon_mad_smoke", 1000, 10, false, 150, false, {TEAM_ETC})
AddCustomShipment("Flash Bang", "models/weapons/w_eq_flashbang.mdl", "weapon_mad_flash", 1075, 10, false, 200, false, {TEAM_ETC})
AddCustomShipment("XM1014", "models/weapons/w_shot_xm1014.mdl", "weapon_mad_xm1014", 1550, 10, false, 300, false {TEAM_ETC})
AddCustomShipment("M249", "models/weapons/w_mach_m249para.md", "weapon_mad_m249", 1750, 10, false, 430, false {TEAM_ETC})
AddCustomShipment("SG550 Sniper Rifle", "models/weapons/w_snip_sg550.mdl", "weapon_mad_sg550", 1400, 10, false, 230, false {TEAM_ETC})


To this:



AddCustomShipment("JBomb", "models/weapons/w_jb.mdl", "weapon_jihadbomb", 2000, 10, false, nil, false, {TEAM_TERRORIST})
AddCustomShipment("Rape", "models/weapons/w_c4.mdl", "weapon_rape", 1000, 10, false, nil, false, {TEAM_CREEP})
AddCustomShipment("C4", "models/weapons/w_c4.mdl", "weapon_mad_c4", 1500, 10, false, nil, false, {TEAM_TERRORIST})
AddCustomShipment("Door Charge", "models/weapons/w_slam.mdl", "weapon_mad_charge", 1250, 10, false, nil, false, {TEAM_TERRORIST})
AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "weapon_mad_knife", 750, 12, false, nil, false, {TEAM_GUN})


AddCustomShipment("Famas Assault Rifle", "models/weapons/w_rif_famas.mdl", 1500, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("AUG Assault Rifle", "models/weapons/w_rif_aug.mdl", 1650, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("AK47 Assault Rifle", "models/weapons/w_rif_ak47", 1400, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("TMP SMG", "models/weapons/w_smg_tmp.mdl", "weapon_mad_tmp", 1200, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("P90 SMG", "models/weapons/w_smg_p90.mdl", "weapon_mad_p90", 1100, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("UMP SMG", "models/weapons/w_smg_ump.mdl", "weapon_mad_ump", 1300, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("Scout Sniper", "models/weapons/w_snip_scout.mdl", "weapon_mad_scout", 1300, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "weapon_mad_awp", 1350, 10, false, nil, false {TEAM_HGUN2})
AddCustomShipment("SPAS-12", "models/weapons/w_shotgun.mdl", "weapon_mad_spas", 1250, 10, false, nil, false, {TEAM_HGUN2})

AddCustomShipment("Alyx Gun", "models/weapons/w_alyx_gun_2.mdl", "weapon_mad_alyxgun", 1000, 10, false, nil, false {TEAM_ETC})
AddCustomShipment("Incedinary Grenade", "models/weapons/w_eq_smokegrenade.mdl", "weapon_mad_incedinary", 1100, 10, false, nil, false, {TEAM_ETC})
AddCustomShipment("HE Grenade", "models/weapons/w_eq_fraggrenade.mdl", "weapon_mad_grenade", 1100, 10, false, nil, false, {TEAM_ETC})
AddCustomShipment("Smoke Grenade", "models/weapons/w_eq_smokegrenade.mdl", "weapon_mad_smoke", 1000, 10, false, nil, false, {TEAM_ETC})
AddCustomShipment("Flash Bang", "models/weapons/w_eq_flashbang.mdl", "weapon_mad_flash", 1075, 10, false, nil, false, {TEAM_ETC})
AddCustomShipment("XM1014", "models/weapons/w_shot_xm1014.mdl", "weapon_mad_xm1014", 1550, 10, false, nil, false {TEAM_ETC})
AddCustomShipment("M249", "models/weapons/w_mach_m249para.md", "weapon_mad_m249", 1750, 10, false, nil, false {TEAM_ETC})
AddCustomShipment("SG550 Sniper Rifle", "models/weapons/w_snip_sg550.mdl", "weapon_mad_sg550", 1400, 10, false, nil, false {TEAM_ETC})


Oh, and if that didn’t work, are there any console errors?

Also, in the shared.lua file there is a mini-tutorial on how to add weapons. If the code you have copied is a few months old then there are multiple changes you must make.

Also, if you look towards the end of the file the last few weapons have “{TEAM_ECT}” is this purposely done?

Ok I will try that, and yes I did do ETC on purpose

[editline]23rd July 2012[/editline]

Unfortunately changing the values to nil didn’t work, same problem.

Which Mad Cows Weapons version are you using?

3.0 beta

Use this one, its a lot better http://www.garrysmod.org/downloads/?a=view&id=123076
it might work then