DarkRP:Shipments

From GMod Wiki

Jump to: navigation, search
Deletion.pngThis page has been nominated for deletion. Deletion is due within approximately 30 days from nomination, unless the deletion has been disputed on the talk page. See more pages nominated for deletion here.
Reason for deletion: Not what Garry wants the wiki to be used for
Last Edit was made on 11/16/2011

A Shipment Would Look Like This:

 
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)
 
 

Here's a HL2 Pistol Shipment:

 
AddCustomShipment("HL2pistol", "models/weapons/W_pistol.mdl", "weapon_pistol", 500, 10, false, 200, false, {TEAM_GUN})
 


The Layout:

Shipment("HL2pistol") = The name displayed in the F4 menu.

"models/weapons/W_pistol.mdl", = The model to come out of the shipment when used (NEVER USE V_ MODELS).

"weapon_pistol" = The entity that comes out, for weapons use the name of the folder in /lua/weapons, you can use weapons from your addons without having to move them over into DarkRP. For entities use the name of the folder in /lua/entities, again you can use entities from your addons without having to move them over into DarkRP.

, 500 = The default price of the full shipment, can be changed in-game too.

10, = Decides how many objects are stored in the shipment.

false = Not sold separately. If you set this to true, players will be able to buy just 1 of the entity in-game, regardless of their class, set to false and it will be only available via a shipment from the gun dealer.

200 = Price when sold separately, you only need to set this if the above is true, this is the cost of just 1 of the entity.

, false, = /buy only, if you set this to true you will only be able to buy this shipment separately, not as a shipment.

{TEAM_GUN} = The teams that can buy the shipment, use the TEAM_ you set for the team in shared.lua, you can add more than 1 team by separating them with commas, eg: {TEAM_GUN, TEAM_CHIEF}.

Here are some shipments to get you going:

WARNING: You need Counter-Strike Source Realistic Weapons 4 , You can get it here.

The Model list is here here.

 
-- CS:S Weps
AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "weapon_real_cs_m249", 6000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Galil", "models/weapons/w_rif_galil.mdl", "weapon_real_cs_galil", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "weapon_real_cs_ak47", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("M4A1", "models/weapons/w_rif_m4a1.mdl", "weapon_real_cs_m4a1", 3900, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Famas", "models/weapons/w_rif_famas.mdl", "weapon_real_cs_famas", 3900, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "weapon_real_cs_awp", 5000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Scout", "models/weapons/w_snip_scout.mdl", "weapon_real_cs_scout", 4500, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("SteyrAug", "models/weapons/w_rif_aug.mdl", "weapon_real_cs_aug", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("SG552", "models/weapons/w_rif_sg552.mdl", "weapon_real_cs_sg552", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("G3SG1", "models/weapons/w_snip_g3sg1.mdl", "weapon_real_cs_g3sg1", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("SG550", "models/weapons/w_snip_sg550.mdl", "weapon_real_cs_sg550", 4000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("UMP45", "models/weapons/w_smg_ump45.mdl", "weapon_real_cs_ump_45", 3600, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("P90", "models/weapons/w_smg_p90.mdl", "weapon_real_cs_p90", 3500, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("TMP", "models/weapons/w_smg_tmp.mdl", "weapon_real_cs_tmp", 3500, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "weapon_real_cs_mp5a5", 3200, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Mac10", "models/weapons/w_smg_mac10.mdl", "weapon_real_cs_mac10", 3000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("AutoShotgun", "models/weapons/w_shot_xm1014.mdl", "weapon_real_cs_xm1014", 3000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Shotgun", "models/weapons/w_shot_m3super90.mdl", "weapon_real_cs_pumpshotgun", 2500, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Grenade", "models/weapons/w_eq_fraggrenade.mdl", "weapon_real_cs_grenade", 15000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Flash", "models/weapons/w_eq_flashbang_thrown.mdl", "weapon_real_cs_flash", 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Smoke", "models/weapons/w_eq_smokegrenade.mdl", "weapon_real_cs_smoke", 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("DualElites", "models/weapons/w_pist_elite_dropped.mdl", "weapon_real_cs_elites", 2300, 10, true, 250, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Deagle", "models/weapons/w_pist_deagle.mdl", "weapon_real_cs_desert_eagle", 2300, 10, true, 250, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("USP", "models/weapons/w_pist_usp.mdl", "weapon_real_cs_usp", 2200, 10, true, 240, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "weapon_real_cs_p228", 2100, 10, true, 220, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "weapon_real_cs_glock18", 2000, 10, true, 210, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("FiveSeven", "models/weapons/w_pist_fiveseven.mdl", "weapon_real_cs_five-seven", 1900, 10, true, 200, false, {TEAM_GUN, TEAM_ADMIN})
AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "weapon_real_cs_knife", 2000, 10, false, 0, false, {TEAM_GUN, TEAM_ADMIN})
 

Their is an Admin class above who is also allowed to buy them, so its available to only admins and gun dealers.

Here's the code for the Admin class if you would like to use it, read the guide on adding custom jobs if you're unsure what to do with it.

TEAM_ADMIN = AddExtraTeam("Admin Police", Color(255,255,255,255), "models/player/Combine_Super_Soldier.mdl", [[The Admin Police is only used by admins, they do the most basic admin things.
]], {"Glock", "StunStick", "Arrest Baton", "Unarrest Baton"}, "adminpolice", 3, 50, 1, false, true, {TEAM_POLICE})
 
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox