• DarkRP Shipments breaking gamemode
    2 replies, posted
I am helping my friend with his server and I have expeireinced a problem with the code. When I implement this code, it breaks the gun dealers and makes it so no one can sell weapons and shipments. I can not find what is breaking it at all and I need other's help to figure it out with me. FYI; I use Notepad++. [lua] AddCustomShipment("Desert eagle", "models/weapons/w_pist_deagle.mdl", "weapon_real_cs_desert_eagle", 250, 10, true, 250, true, {}) AddCustomShipment("Fiveseven", "models/weapons/w_pist_fiveseven.mdl", "weapon_real_cs_five-seven", 0, 10, true, 200, true, {}) AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "weapon_real_cs_glock18", 0, 10, true, 160, true, {}) AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_real_cs_p228", 0, 10, true, 190, true, {}) AddCustomShipment("USP", "models/weapons/w_pist_usp.mdl", "weapon_real_cs_usp", 0, 10, true, 240, true, {}) AddCustomShipment("Dual-Elites", "models/weapons/w_pist_elite.mdl", "weapon_real_cs_elites", 0, 10, true, 250, true, {}) --AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_ak472", 2450, 10, false, nil, false, {TEAM_GUN}) --AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_mp52", 2200, 10, false, nil, false, {TEAM_GUN}) --AddCustomShipment("M4", "models/weapons/w_rif_m4a1.mdl", "weapon_m42", 2450, 10, false, nil, false, {TEAM_GUN}) --AddCustomShipment("Mac 10", "models/weapons/w_smg_mac10.mdl", "weapon_mac102", 2150, 10, false, nil, false, {TEAM_GUN}) --AddCustomShipment("Pump shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_pumpshotgun2", 1750, 10, false, nil, false, {TEAM_GUN}) --AddCustomShipment("Sniper rifle", "models/weapons/w_snip_g3sg1.mdl", "ls_sniper", 3750, 10, false, nil, false, {TEAM_GUN}) AddEntity("Drug lab", "drug_lab", "models/props_lab/crematorcase.mdl", 400, 3, "/buydruglab", {TEAM_GANG, TEAM_MOB}) AddEntity("Money printer", "money_printer", "models/props_c17/consolebox01a.mdl", 1000, 2, "/buymoneyprinter") AddEntity("Microwave", "microwave", "models/props/cs_office/microwave.mdl", 400, 1, "/buymicrowave", TEAM_COOK) AddEntity("Gun lab", "gunlab", "models/props_c17/TrapPropeller_Engine.mdl", 500, 1, "/buygunlab", TEAM_GUN) /* How to add custom vehicles: FIRST go ingame, type rp_getvehicles for available vehicles! then: AddCustomVehicle(<One of the vehicles from the rp_getvehicles list>, <Price of the vehicle>, <OPTIONAL jobs that can buy the vehicle>) Examples: AddCustomVehicle("Jeep", "models/buggy.mdl", 100 ) AddCustomVehicle("Airboat", "models/airboat.mdl", 600, {TEAM_GUN}) AddCustomVehicle("Airboat", "models/airboat.mdl", 600, {TEAM_GUN, TEAM_MEDIC}) Add those lines under your custom shipments. At the bottom of this file or in data/CustomShipments.txt HOW TO ADD CUSTOM SHIPMENTS: AddCustomShipment("<Name of the shipment(no spaces)>"," <the model that the shipment spawns(should be the world model...)>", "<the classname of the weapon>", <the price of one shipment>, <how many guns there are in one shipment>, <OPTIONAL: true/false sold seperately>, <OPTIONAL: price when sold seperately>, < true/false OPTIONAL: /buy only = true> , OPTIONAL which classes can buy the shipment, OPTIONAL: the model of the shipment) Notes: MODEL: you can go to Q and then props tab at the top left then search for w_ and you can find all world models of the weapons! CLASSNAME OF THE WEAPON there are half-life 2 weapons you can add: weapon_pistol weapon_smg1 weapon_ar2 weapon_rpg weapon_crowbar weapon_physgun weapon_357 weapon_crossbow weapon_slam weapon_bugbait weapon_frag weapon_physcannon weapon_shotgun gmod_tool But you can also add the classnames of Lua weapons by going into the weapons/ folder and look at the name of the folder of the weapon you want. Like the player possessor swep in addons/Player Possessor/lua/weapons You see a folder called weapon_posessor This means the classname is weapon_posessor YOU CAN ADD ITEMS/ENTITIES TOO! but to actually make the entity you have to press E on the thing that the shipment spawned, BUT THAT'S OK! YOU CAN MAKE GUNDEALERS ABLE TO SELL MEDKITS! true/false: Can the weapon be sold seperately?(with /buy name) if you want yes then say true else say no the price of sold seperate is the price it is when you do /buy name. Of course you only have to fill this in when sold seperate is true. EXAMPLES OF CUSTOM SHIPMENTS(remove the // to activate it): */ //AddCustomShipment("HL2pistol", "models/weapons/W_pistol.mdl", "weapon_pistol", 500, 10, false, 200, false, {TEAM_GUN, TEAM_MEDIC}) --EXAMPLE OF AN ENTITY(in this case a medkit) --AddCustomShipment("bball", "models/Combine_Helicopter/helicopter_bomb01.mdl", "sent_ball", 100, 10, false, 10, false, {TEAM_GUN}, "models/props_c17/oildrum001_explosive.mdl") --EXAMPLE OF A BOUNCY BALL: NOTE THAT YOU HAVE TO PRESS E REALLY QUICKLY ON THE BOMB OR YOU'LL EAT THE BALL LOL --AddCustomShipment("bball", "models/Combine_Helicopter/helicopter_bomb01.mdl", "sent_ball", 100, 10, true, 10, true) -- ADD CUSTOM SHIPMENTS HERE(next line): AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_real_cs_ak47", 5050, 10, false, 2550, false, {TEAM_BLACKMARKET}) AddCustomShipment("AUG", "models/weapons/w_rif_aug.mdl", "weapon_real_cs_aug", 5300, 10, false, 2750, false, {TEAM_BLACKMARKET}) AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "weapon_real_cs_awp", 7000, 10, false, 3500, false, {TEAM_BLACKMARKET}) AddCustomShipment("Famas", "models/weapons/w_rif_famas.mdl", "weapon_real_cs_famas", 5300, 10, false, 2750, false, {TEAM_BLACKMARKET}) AddCustomShipment("G3SG1", "models/weapons/w_snip_g3sg1.mdl", "weapon_real_cs_g3sg1", 7000, 10, false, 3500, false, {TEAM_BLACKMARKET}) AddCustomShipment("Galil", "models/weapons/w_rif_galil.mdl", "weapon_real_cs_galil", 6000, 10, false, 2925, false, {TEAM_BLACKMARKET}) AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "weapon_real_cs_knife", 5000, 10, false, 2500, false, {TEAM_BLACKMARKET}) AddCustomShipment("M4A1", "models/weapons/w_rif_m4a1.mdl", "weapon_real_cs_m4a1", 5300, 10, false, 2750, false, {TEAM_GUN}) AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 7000, 10, false, 3500, false, {TEAM_BLACKMARKET}) AddCustomShipment("Mac10", "models/weapons/w_smg_mac10.mdl", "weapon_real_cs_mac10", 4300, 10, false, 2250, false, {TEAM_BLACKMARKET}) AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_real_cs_mp5a5", 5000, 10, false, 2500, false, {TEAM_BLACKMARKET}) AddCustomShipment("P90", "models/weapons/w_smg_p90.mdl", "weapon_real_cs_p90", 6300, 10, false, 3150, false, {TEAM_BLACKMARKET}) AddCustomShipment("Shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_real_cs_pumpshotgun", 3300, 10, false, 1750, false, {TEAM_GUN}) AddCustomShipment("Scout", "models/weapons/w_snip_scout.mdl", "weapon_real_cs_scout", 6000, 10, false, 3000, false, {TEAM_BLACKMARKET}) AddCustomShipment("SG550", "models/weapons/w_snip_sg550.mdl", "weapon_real_cs_sg550", 6000, 10, false, 2950, false, {TEAM_BLACKMARKET}) AddCustomShipment("SG552", "models/weapons/w_rif_sg552.mdl", "weapon_real_cs_sg552", 7000, 10, false, 3500, false, {TEAM_BLACKMARKET}) AddCustomShipment("TMP", "models/weapons/w_smg_tmp.mdl", "weapon_real_cs_tmp", 5000, 10, false, 2500, false, {TEAM_BLACKMARKET}) AddCustomShipment("UMP", "models/weapons/w_smg_ump45.mdl", "weapon_real_cs_ump_45", 4300, 10, false, 2750, false, {TEAM_BLACKMARKET}) AddCustomShipment("Auto shotgun", "models/weapons/w_shot_xm1014.mdl", "weapon_real_cs_xm1014", 4500, 10, false, 2250, false, {TEAM_BLACKMARKET}) AddCustomShipment("Lockpick", "models/weapons/w_crowbar.mdl", "lockpick", 4000, 10, true, 700, false, {TEAM_BLACKMARKET}) AddCustomShipment("Keypad Cracker", "models/weapons/w_c4.mdl", "keypad_cracker", 4000, 10, true, 700, false, {TEAM_BLACKMARKET}) AddCustomShipment("DualElites", "models/weapons/w_pist_elite_dropped.mdl", "weapon_real_cs_elites", 4600, 10, true, 250, false, {TEAM_GUN}) AddCustomShipment("Deagle", "models/weapons/w_pist_deagle.mdl", "weapon_real_cs_desert_eagle", 4600, 10, true, 250, false, {TEAM_GUN}) AddCustomShipment("USP", "models/weapons/w_pist_usp.mdl", "weapon_real_cs_
AddCustomVehicle("Jeep", "models/buggy.mdl", 2000, {TEAM_CARD}) you missed out a comma
Edit:It is working now, thanks for the help.
Sorry, you need to Log In to post a reply to this thread.