I'm getting this error:
[ERROR] gamemodes/darkrp/gamemode/addentities.lua:184: ')' expected near '{'
1. unknown - gamemodes/darkrp/gamemode/addentities.lua:0
This is the addentities.lua file
-- AddCustomShipment("Desert eagle", "models/weapons/w_pist_deagle.mdl", "weapon_deagle2", 215, 10, false, 215, false, {TEAM_HEAVY})
-- AddCustomShipment("Fiveseven", "models/weapons/w_pist_fiveseven.mdl", "weapon_fiveseven2", 0, 10, false, 205, false, {TEAM_HEAVY})
-- AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "weapon_glock2", 0, 10, false, 160, false, {TEAM_HEAVY})
-- AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_p2282", 0, 10, false, 185, false, {TEAM_HEAVY})
-- AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_ak472", 2450, 10, false, nil, false, {TEAM_HEAVY})
-- AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_mp52", 2200, 10, false, nil, false, {TEAM_HEAVY})
-- AddCustomShipment("M4", "models/weapons/w_rif_m4a1.mdl", "weapon_m42", 2450, 10, false, nil, false, {TEAM_HEAVY})
-- AddCustomShipment("Mac 10", "models/weapons/w_smg_mac10.mdl", "weapon_mac102", 2150, 10, false, nil, false, {TEAM_HEAVY})
-- AddCustomShipment("Pump shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_pumpshotgun2", 1750, 10, false, nil, false, {TEAM_HEAVY})
-- AddCustomShipment("Sniper rifle", "models/weapons/w_snip_g3sg1.mdl", "ls_sniper", 3750, 10, false, nil, false, {TEAM_HEAVY})
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_HEAVY)
/*
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_HEAVY})
AddCustomVehicle("Airboat", "models/airboat.mdl", 600, {TEAM_HEAVY, 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: false/false sold seperately>, <OPTIONAL: price when sold seperately>, < false/false OPTIONAL: /buy only = false> , 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!
false/false: Can the weapon be sold seperately?(with /buy name) if you want yes then say false 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 false.
EXAMPLES OF CUSTOM SHIPMENTS(remove the // to activate it): */
//AddCustomShipment("HL2pistol", "models/weapons/W_pistol.mdl", "weapon_pistol", 500, 10, false, 200, false, {TEAM_HEAVY, 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_HEAVY}, "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, false, 10, false)
-- ADD CUSTOM SHIPMENTS HERE(next line):
-- Half life 2 weapons:
AddCustomShipment("Crowbar", "models/weapons/w_crowbar.mdl", "weapon_crowbar", 10, 1, false, 0, false, {TEAM_BLACK})
AddCustomShipment("Spas-12", "models/weapons/w_shotgun.mdl", "weapon_mad_spas", 3500, 10, false, 0, false, {TEAM_BLACK})
AddCustomShipment("Spas-12 Single", "models/weapons/w_shotgun.mdl", "weapon_mad_spas", 400, 1, false, 0, false, {TEAM_BLACK})
AddCustomShipment("Alyx Gun", "models/weapons/w_alyx_gun.mdl", "weapon_mad_alyxgun", 8000, 10, false, 0, false, {TEAM_BLACK})
AddCustomShipment("Alyx Gun Single", "models/weapons/w_alyx_gun.mdl", "weapon_mad_alyxgun", 1000, 1, false, 0, false, {TEAM_BLACK})
-- Other:
AddCustomShipment("Flare gun", "models/weapons/w_pistol.mdl", "weapon_mad_flare", 1600, 10, false, 0, false, {TEAM_BLACK})
AddCustomShipment("Medic kit", "models/items/w_medkit.mdl", "weapon_mad_medic", 2300, 10, false, 0, false, {TEAM_BLACK, TEAM_MEDIC})
-- Insane weapons: (Remove the "--" at the start of each to activate)
-- AddCustomShipment("Grenade launcher", "models/weapons/w_shotgun.mdl", "weapon_mad_grenadelauncher", 20000, 10, false, 0, false, {TEAM_HEAVY})
-- AddCustomShipment("Rocket launcher", "models/weapons/w_rocket_launcher.mdl", "weapon_mad_rpg", 40000, 10, false, 0, false, {TEAM_HEAVY})
-- AddCustomShipment("C4 Explosive", "models/weapons/w_c4_planted.mdl", "weapon_mad_c4", 60000, 10, false, 7000, false, {TEAM_HEAVY})
-- AddCustomShipment("Mine", "models/props_combine/combine_mine01.mdl", "weapon_mad_mine", 60000, 10, false, 7000, false, {TEAM_HEAVY})
-- M9K!
-- Assault Rifle
AddCustomShipment("UMP45", "models/weapons/w_hk_ump45.mdl", "weapon_mad_ump", 3600, 10, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("UMP45 Single", "models/weapons/w_smg_ump45.mdl", "weapon_mad_ump", 450, 1, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("P90", "models/weapons/w_smg_p90.mdl", "weapon_mad_p90", 3500, 10, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("P90 Single", "models/weapons/w_smg_p90.mdl", "weapon_mad_p90", 500, 1, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("Steyr Aug", "models/weapons/w_rif_aug.mdl", "weapon_mad_aug", 4000, 10, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("Steyr Aug Single", "models/weapons/w_rif_aug.mdl", "weapon_mad_aug", 500, 1, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("SG552", "models/weapons/w_rif_sg552.mdl", "weapon_mad_sg552", 4000, 10, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("SG552 Single", "models/weapons/w_rif_sg552.mdl", "weapon_mad_sg552", 510, 1, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("G3SG1", "models/weapons/w_snip_g3sg1.mdl", "weapon_mad_g3", 4000, 10, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("G3SG1 Single", "models/weapons/w_snip_g3sg1.mdl", "weapon_mad_g3", 500, 1, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("SG550", "models/weapons/w_snip_sg550.mdl", "weapon_mad_sg550", 4000, 10, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("SG550 Single", "models/weapons/w_snip_sg550.mdl", "weapon_mad_sg550", 525, 1, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("Galil", "models/weapons/w_rif_galil.mdl", "weapon_mad_galil", 4000, 10, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("Galil Single", "models/weapons/w_rif_galil.mdl", "weapon_mad_galil", 750, 1, false, 0, false, {TEAM_HEAVY})
AddCustomShipment("AK47", "mode
This is one of the most disgusting pieces of code I've ever seen, why would anything be done so badly?
Also there's no need to use spoiler tags improperly and then paste the entire block of code in the post. Use [URL="http://pastebin.com/"]pastebin [/URL]or [URL="http://privatepaste.com/"]privatepaste [/URL]or [URL="http://alternativeto.net/software/pastebin/"]anything really[/URL]
By the looks of what you posted though, 184 looks fine. This isn't a hard issue to fix, honestly. If you used a proper paste tool and didn't butcher the file maybe the error would be easier to find.
From what I can tell you are attempting to create a separate entity just for singles. In the command line itself, you set it to be able to sell as a single and for what price.
If you read the help format of how to make a custom shipment, this would not have happened.
So an example would be:
AddCustomShipment("UMP45", "models/weapons/w_hk_ump45.mdl", "weapon_mad_ump", 3600, 10, true, 400, false, {TEAM_HEAVY})
[IMG]http://puu.sh/3gJR3.png[/IMG]
Try to remove all the sperate lines that have the title 'single' and edit the regular one to have this format.
Hope that helps!
[QUOTE=Eu4oria;41052961]From what I can tell you are attempting to create a separate entity just for singles. In the command line itself, you set it to be able to sell as a single and for what price.
So an example would be:
AddCustomShipment("UMP45", "models/weapons/w_hk_ump45.mdl", "weapon_mad_ump", 3600, 10, true, 400, false, {TEAM_HEAVY})
[IMG]http://puu.sh/3gJR3.png[/IMG]
Try to remove all the sperate lines that have the title 'single' and edit the regular one to have this format.[/QUOTE]
I've tried doing that, and if I do that, every job has access to it.
Also you are using an old version of add entities.
If you use the new darkrp it would look like this.
The new addentities is easier to modify.
[IMG]http://puu.sh/3gKbX.png[/IMG]
Here's your file... you missed a lot of commas.
[url]http://pastebin.com/fxkjf3xN[/url]
Loads fine on my server now... I'm going to assume you have the right functions that this calls loaded fine.
Sorry, you need to Log In to post a reply to this thread.