summaryrefslogtreecommitdiff
path: root/gamemode/items
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-05-30 21:01:18 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-05-30 21:01:18 -0400
commitd62058fcdea5fc6736a2a373f47dc6c14c70c319 (patch)
tree79a1325190e3f1f1b6d6a2dbcdfc1ba3fa866ac9 /gamemode/items
parentc38f00182ba6c282806eecb39a42e64d5feafa37 (diff)
downloadredead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.gz
redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.tar.bz2
redead-d62058fcdea5fc6736a2a373f47dc6c14c70c319.zip
Removed exessive whitespace so future commits will be cleaner
Diffstat (limited to 'gamemode/items')
-rw-r--r--gamemode/items/ammo.lua61
-rw-r--r--gamemode/items/misc.lua326
-rw-r--r--gamemode/items/misc_explosive.lua40
-rw-r--r--gamemode/items/special.lua48
-rw-r--r--gamemode/items/supplies.lua129
-rw-r--r--gamemode/items/weapons_common.lua242
-rw-r--r--gamemode/items/weapons_special.lua56
7 files changed, 450 insertions, 452 deletions
diff --git a/gamemode/items/ammo.lua b/gamemode/items/ammo.lua
index a554382..cd90f8d 100644
--- a/gamemode/items/ammo.lua
+++ b/gamemode/items/ammo.lua
@@ -13,33 +13,33 @@ PRICE_ENERGYCELL = 8
function FUNC_AMMO( ply, id )
local tbl = item.GetByID( id )
-
+
if not tbl.Ammo then return true end
ply:AddAmmo( tbl.Ammo, tbl.Amount )
return true
-
+
end
function FUNC_DROPAMMO( ply, id, drop )
local tbl = item.GetByID( id )
-
+
if not tbl.Ammo then return end
ply:AddAmmo( tbl.Ammo, -tbl.Amount, true )
-
+
return true // we don't want to override spawning the prop
end
-item.Register( {
- Name = "Pistol Rounds",
+item.Register( {
+ Name = "Pistol Rounds",
Description = "40 pistol rounds per box.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_AMMO,
- Weight = 0.75,
+ Weight = 0.75,
Price = PRICE_PISTOL,
Rarity = 0.20,
Model = "models/items/357ammo.mdl",
@@ -48,15 +48,15 @@ item.Register( {
PickupFunction = FUNC_AMMO,
DropFunction = FUNC_DROPAMMO,
CamPos = Vector(14,13,4),
- CamOrigin = Vector(0,0,3)
+ CamOrigin = Vector(0,0,3)
} )
-item.Register( {
- Name = "Buckshot",
+item.Register( {
+ Name = "Buckshot",
Description = "20 shotgun rounds per box.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_AMMO,
- Weight = 0.75,
+ Weight = 0.75,
Price = PRICE_BUCKSHOT,
Rarity = 0.20,
Model = "models/items/boxbuckshot.mdl",
@@ -68,12 +68,12 @@ item.Register( {
CamOrigin = Vector(0,0,4)
} )
-item.Register( {
- Name = "SMG Rounds",
+item.Register( {
+ Name = "SMG Rounds",
Description = "60 SMG rounds per box.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_AMMO,
- Weight = 0.75,
+ Weight = 0.75,
Price = PRICE_SMGROUNDS,
Rarity = 0.50,
Model = "models/items/boxsrounds.mdl",
@@ -85,12 +85,12 @@ item.Register( {
CamOrigin = Vector(0,0,4)
} )
-item.Register( {
- Name = "Rifle Rounds",
+item.Register( {
+ Name = "Rifle Rounds",
Description = "60 automatic rifle rounds per box.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_AMMO,
- Weight = 0.75,
+ Weight = 0.75,
Price = PRICE_RIFLEROUNDS,
Rarity = 0.80,
Model = "models/items/boxmrounds.mdl",
@@ -102,12 +102,12 @@ item.Register( {
CamOrigin = Vector(0,0,5)
} )
-item.Register( {
- Name = "Sniper Rounds",
+item.Register( {
+ Name = "Sniper Rounds",
Description = "30 sniper rounds per box.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_AMMO,
- Weight = 0.75,
+ Weight = 0.75,
Price = PRICE_SNIPERROUNDS,
Rarity = 0.75,
Model = "models/items/boxqrounds.mdl",
@@ -119,12 +119,12 @@ item.Register( {
CamOrigin = Vector(4,0,-1)
} )
-item.Register( {
- Name = "Prototype Energy Cell",
+item.Register( {
+ Name = "Prototype Energy Cell",
Description = "15 energy charges per cell.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_AMMO,
- Weight = 1.25,
+ Weight = 1.25,
Price = PRICE_ENERGYCELL,
Rarity = 0.85,
Model = "models/items/battery.mdl",
@@ -133,6 +133,5 @@ item.Register( {
PickupFunction = FUNC_AMMO,
DropFunction = FUNC_DROPAMMO,
CamPos = Vector(15,15,8),
- CamOrigin = Vector(0,0,5)
+ CamOrigin = Vector(0,0,5)
} )
-
diff --git a/gamemode/items/misc.lua b/gamemode/items/misc.lua
index b15db67..dda95c4 100644
--- a/gamemode/items/misc.lua
+++ b/gamemode/items/misc.lua
@@ -23,7 +23,7 @@ function FUNC_EAT( ply, id, client, icon )
if icon then return "icon16/cake.png" end
if client then return "Eat" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "npc/barnacle/barnacle_crunch2.wav", 100, math.random( 90, 110 ) )
ply:AddHealth( 25 )
@@ -37,7 +37,7 @@ function FUNC_BOOZE( ply, id, client, icon )
if icon then return "icon16/drink.png" end
if client then return "Drink" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( table.Random{ "npc/barnacle/barnacle_gulp1.wav", "npc/barnacle/barnacle_gulp2.wav" }, 100, math.random( 90, 110 ) )
ply:AddRadiation( -2 )
@@ -45,7 +45,7 @@ function FUNC_BOOZE( ply, id, client, icon )
ply:Notice( "+20 Stamina", GAMEMODE.Colors.Green )
ply:Notice( "-2 Radiation", GAMEMODE.Colors.Green )
ply:Notice( "+4 Intoxication", GAMEMODE.Colors.Red )
-
+
umsg.Start( "Drunk", ply )
umsg.Short( 4 )
umsg.End()
@@ -56,13 +56,13 @@ function FUNC_MOONSHINE( ply, id, client, icon )
if icon then return "icon16/drink.png" end
if client then return "Drink" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( table.Random{ "npc/barnacle/barnacle_gulp1.wav", "npc/barnacle/barnacle_gulp2.wav" }, 100, math.random( 90, 110 ) )
ply:AddRadiation( -1 )
ply:Notice( "-1 Radiation", GAMEMODE.Colors.Green )
ply:Notice( "+6 Intoxication", GAMEMODE.Colors.Red )
-
+
umsg.Start( "Drunk", ply )
umsg.Short( 6 )
umsg.End()
@@ -73,13 +73,13 @@ function FUNC_BEER( ply, id, client, icon )
if icon then return "icon16/drink.png" end
if client then return "Drink" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( table.Random{ "npc/barnacle/barnacle_gulp1.wav", "npc/barnacle/barnacle_gulp2.wav" }, 100, math.random( 90, 110 ) )
ply:AddStamina( 15 )
ply:Notice( "+15 Stamina", GAMEMODE.Colors.Green )
ply:Notice( "+2 Intoxication", GAMEMODE.Colors.Red )
-
+
umsg.Start( "Drunk", ply )
umsg.Short( 2 )
umsg.End()
@@ -90,11 +90,11 @@ function FUNC_SPACEBEER( ply, id, client, icon )
if icon then return "icon16/drink.png" end
if client then return "Drink" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( table.Random{ "npc/barnacle/barnacle_gulp1.wav", "npc/barnacle/barnacle_gulp2.wav" }, 100, math.random( 90, 110 ) )
ply:Notice( "+15 Intoxication", GAMEMODE.Colors.Red )
-
+
umsg.Start( "Drunk", ply )
umsg.Short( 15 )
umsg.End()
@@ -105,109 +105,109 @@ function FUNC_UNMUTAGEN( ply, id, client, icon )
if icon then return "icon16/pill.png" end
if client then return "Inject" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "Weapon_SMG1.Special1" )
-
+
local tbl = {}
local inc = 0
-
+
for i=1,math.random(1,3) do
-
+
local rand = math.random(1,6)
-
+
while table.HasValue( tbl, rand ) do
-
+
rand = math.random(1,6)
-
+
end
-
+
table.insert( tbl, rand )
-
+
if rand == 1 then
-
+
ply:Notice( "You feel extremely nauseous", GAMEMODE.Colors.Red, 5, inc * 2 )
-
+
umsg.Start( "Drunk", ply )
umsg.Short( 20 )
umsg.End()
-
+
elseif rand == 2 then
-
+
local rad = math.random(2,5)
-
+
if math.random(1,2) == 1 then
-
+
ply:Notice( "+" .. rad .. " Radiation", GAMEMODE.Colors.Red, 5, inc * 2 )
ply:AddRadiation( rad )
-
+
else
-
+
ply:Notice( "-" .. rad .. " Radiation", GAMEMODE.Colors.Green, 5, inc * 2 )
ply:AddRadiation( -rad )
-
+
end
-
+
elseif rand == 3 then
-
+
if ply:IsInfected() then
-
+
ply:Notice( "Your infection has been cured", GAMEMODE.Colors.Green, 5, inc * 2 )
ply:SetInfected( false )
-
+
else
-
+
ply:Notice( "You were infected by the drug", GAMEMODE.Colors.Red, 5, inc * 2 )
ply:SetInfected( true )
-
+
end
-
+
elseif rand == 4 then
-
+
if math.random(1,2) == 1 then
-
+
ply:Notice( "You feel exhausted", GAMEMODE.Colors.Red, 5, inc * 2 )
ply:AddStamina( -50 )
-
+
else
-
+
ply:Notice( "+20 Stamina", GAMEMODE.Colors.Green, 5, inc * 2 )
ply:AddStamina( 20 )
-
+
end
-
+
elseif rand == 5 then
-
+
ply:Notice( "Your whole body aches", GAMEMODE.Colors.Red, 5, inc * 2 )
-
+
local dmg = math.random(1,5)
-
+
ply:AddHealth( dmg * -10 )
-
+
if math.random(1,20) == 1 then
-
+
local dietime = math.random( 30, 120 )
-
+
timer.Simple( dietime - 5, function() ply:Notice( "You feel a sharp pain in your chest", GAMEMODE.Colors.Red, 5 ) end )
timer.Simple( dietime, function() ply:Kill() end )
-
+
end
-
+
elseif rand == 6 then
-
+
ply:Notice( "Your legs begin to feel weak", GAMEMODE.Colors.Red, 5, inc * 2 )
ply:SetWalkSpeed( GAMEMODE.WalkSpeed - 80 )
ply:SetRunSpeed( GAMEMODE.RunSpeed - 80 )
-
+
local legtime = math.random( 20, 60 )
-
+
timer.Simple( legtime - 5, function() if IsValid( ply ) and ply:Team() == TEAM_ARMY then ply:Notice( "Your legs start to feel better", GAMEMODE.Colors.Green, 5 ) end end )
timer.Simple( legtime, function() if IsValid( ply ) and ply:Team() == TEAM_ARMY then ply:SetWalkSpeed( GAMEMODE.WalkSpeed ) ply:SetRunSpeed( GAMEMODE.RunSpeed ) end end )
-
+
end
-
+
inc = inc + 1
-
+
end
end
@@ -216,7 +216,7 @@ function FUNC_WRENCH( ply, id, client, icon )
if icon then return "icon16/cake.png" end
if client then return "Eat" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "npc/barnacle/barnacle_crunch2.wav", 100, math.random( 90, 110 ) )
ply:EmitSound( "weapons/crowbar/crowbar_impact2.wav", 100, math.random( 90, 110 ) )
@@ -227,20 +227,20 @@ function FUNC_WRENCH( ply, id, client, icon )
end
function FUNC_OPENSUITCASE( ply, id )
-
+
ply:Notice( "You found some " .. GAMEMODE.CurrencyName .. "s", GAMEMODE.Colors.Green )
ply:EmitSound( Sound( "Chain.ImpactSoft" ) )
-
+
if math.random(1,10) == 1 then
-
+
ply:AddCash( math.random(5,50) )
-
+
else
-
+
ply:AddCash( math.random(2,10) )
-
+
end
-
+
return false
end
@@ -249,112 +249,112 @@ function FUNC_OPENBOX( ply, id )
local tbl = { ITEM_SUPPLY, ITEM_AMMO, ITEM_MISC, ITEM_SPECIAL, ITEM_WPN_COMMON, ITEM_WPN_SPECIAL }
local chancetbl = { 0.60, 0.20, 0.50, 0.20, 0.05, 0.03 }
-
+
local rnd = math.Rand(0,1)
- local choice = math.random( 1, table.Count( tbl ) )
-
+ local choice = math.random( 1, table.Count( tbl ) )
+
while rnd > chancetbl[ choice ] do
-
+
rnd = math.Rand(0,1)
- choice = math.random( 1, table.Count( tbl ) )
-
+ choice = math.random( 1, table.Count( tbl ) )
+
end
-
+
local rand = item.RandomItem( tbl[choice] )
-
+
ply:AddIDToInventory( rand.ID )
ply:EmitSound( "Cardboard.Break" )
-
+
return false
end
-item.Register( {
- Name = "Cardboard Box",
+item.Register( {
+ Name = "Cardboard Box",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.95,
- Model = "models/props_junk/cardboard_box001a.mdl",
+ Model = "models/props_junk/cardboard_box001a.mdl",
PickupFunction = FUNC_OPENBOX,
Functions = {}
} )
-item.Register( {
- Name = "Cardboard Box",
+item.Register( {
+ Name = "Cardboard Box",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.95,
- Model = "models/props_junk/cardboard_box001b.mdl",
+ Model = "models/props_junk/cardboard_box001b.mdl",
PickupFunction = FUNC_OPENBOX,
Functions = {}
} )
-item.Register( {
- Name = "Cardboard Box",
+item.Register( {
+ Name = "Cardboard Box",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.95,
- Model = "models/props_junk/cardboard_box002a.mdl",
+ Model = "models/props_junk/cardboard_box002a.mdl",
PickupFunction = FUNC_OPENBOX,
Functions = {}
} )
-item.Register( {
- Name = "Cardboard Box",
+item.Register( {
+ Name = "Cardboard Box",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.95,
- Model = "models/props_junk/cardboard_box002b.mdl",
+ Model = "models/props_junk/cardboard_box002b.mdl",
PickupFunction = FUNC_OPENBOX,
Functions = {}
} )
-item.Register( {
- Name = "Cardboard Box",
+item.Register( {
+ Name = "Cardboard Box",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.95,
- Model = "models/props_junk/cardboard_box003a.mdl",
+ Model = "models/props_junk/cardboard_box003a.mdl",
PickupFunction = FUNC_OPENBOX,
Functions = {}
} )
-item.Register( {
- Name = "Cardboard Box",
+item.Register( {
+ Name = "Cardboard Box",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.95,
- Model = "models/props_junk/cardboard_box003b.mdl",
+ Model = "models/props_junk/cardboard_box003b.mdl",
PickupFunction = FUNC_OPENBOX,
Functions = {}
} )
-item.Register( {
- Name = "Suitcase",
+item.Register( {
+ Name = "Suitcase",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.50,
- Model = "models/props_c17/suitcase_passenger_physics.mdl",
+ Model = "models/props_c17/suitcase_passenger_physics.mdl",
PickupFunction = FUNC_OPENSUITCASE,
Functions = {}
} )
-item.Register( {
- Name = "Briefcase",
+item.Register( {
+ Name = "Briefcase",
CollisionOverride = true,
Type = ITEM_LOOT,
Rarity = 0.50,
- Model = "models/props_c17/briefcase001a.mdl",
+ Model = "models/props_c17/briefcase001a.mdl",
PickupFunction = FUNC_OPENSUITCASE,
Functions = {}
} )
-item.Register( {
- Name = "Wood",
+item.Register( {
+ Name = "Wood",
Description = "Used in building barricades.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_MISC,
- Weight = 1.50,
+ Weight = 1.50,
Price = 15,
Rarity = 0.15,
Model = "models/props_debris/wood_chunk04a.mdl",
@@ -363,96 +363,96 @@ item.Register( {
CamOrigin = Vector(0,0,-1)
} )
-item.Register( {
- Name = "Water",
+item.Register( {
+ Name = "Water",
Description = "Restores 25 stamina and 10 health.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_MISC,
- Weight = 0.15,
+ Weight = 0.15,
Price = 3,
Rarity = 0.05,
Model = "models/props/cs_office/water_bottle.mdl",
Functions = { FUNC_DRINK },
CamPos = Vector(12,12,1),
- CamOrigin = Vector(0,0,0)
+ CamOrigin = Vector(0,0,0)
} )
-item.Register( {
- Name = "Canned Food",
+item.Register( {
+ Name = "Canned Food",
Description = "Restores 25 health and 10 stamina.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_MISC,
- Weight = 0.15,
+ Weight = 0.15,
Price = 3,
Rarity = 0.05,
Model = "models/props_junk/garbage_metalcan001a.mdl",
Functions = { FUNC_EAT },
CamPos = Vector(10,10,0),
- CamOrigin = Vector(0,0,0)
+ CamOrigin = Vector(0,0,0)
} )
-item.Register( {
- Name = "Wrench",
+item.Register( {
+ Name = "Wrench",
Description = "Why would you eat this?",
- Stackable = true,
+ Stackable = true,
Type = ITEM_LOOT,
- Weight = 0.15,
+ Weight = 0.15,
Price = 3,
Rarity = 0.99,
Model = "models/props_c17/tools_wrench01a.mdl",
Functions = { FUNC_WRENCH },
CamPos = Vector(0,0,29),
- CamOrigin = Vector(0,1,4)
+ CamOrigin = Vector(0,1,4)
} )
-item.Register( {
- Name = "Unstable Mutagen",
+item.Register( {
+ Name = "Unstable Mutagen",
Description = "Prototype drug which may cure the infection.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_LOOT,
- Weight = 0.30,
+ Weight = 0.30,
Price = 50,
Rarity = 0.95,
Model = "models/healthvial.mdl",
Functions = { FUNC_UNMUTAGEN },
CamPos = Vector(-16,0,8),
- CamOrigin = Vector(0,0,5)
+ CamOrigin = Vector(0,0,5)
} )
-item.Register( {
- Name = "Beer",
+item.Register( {
+ Name = "Beer",
Description = "Restores 15 stamina.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_LOOT,
- Weight = 0.30,
+ Weight = 0.30,
Price = 5,
Rarity = 0.30,
Model = "models/props_junk/glassbottle01a.mdl",
Functions = { FUNC_BEER },
CamPos = Vector(16,12,1),
- CamOrigin = Vector(0,0,0)
+ CamOrigin = Vector(0,0,0)
} )
-item.Register( {
- Name = "Tequila",
+item.Register( {
+ Name = "Tequila",
Description = "Don't drink this shit.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_LOOT,
- Weight = 0.30,
+ Weight = 0.30,
Price = 5,
Rarity = 0.85,
Model = "models/props_junk/glassjug01.mdl",
Functions = { FUNC_SPACEBEER },
CamPos = Vector(19,0,6),
- CamOrigin = Vector(0,0,5)
+ CamOrigin = Vector(0,0,5)
} )
-item.Register( {
- Name = "Vodka",
+item.Register( {
+ Name = "Vodka",
Description = "Releives radiation poisoning.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_MISC,
- Weight = 0.30,
+ Weight = 0.30,
Price = 10,
Rarity = 0.10,
Model = "models/props_junk/garbage_glassbottle002a.mdl",
@@ -461,86 +461,86 @@ item.Register( {
CamOrigin = Vector(0,0,0)
} )
-item.Register( {
- Name = "Moonshine Vodka",
+item.Register( {
+ Name = "Moonshine Vodka",
Description = "Weaker homebrewed vodka.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_BUYABLE,
- Weight = 0.30,
+ Weight = 0.30,
Price = 5,
Rarity = 0.25,
Model = "models/props_junk/garbage_glassbottle003a.mdl",
Functions = { FUNC_MOONSHINE },
CamPos = Vector(16,17,1),
- CamOrigin = Vector(0,0,-1)
+ CamOrigin = Vector(0,0,-1)
} )
---[[item.Register( {
- Name = "Human Skull",
+--[[item.Register( {
+ Name = "Human Skull",
Description = "This human skull looks pretty old. You decided to name it Murray.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_QUEST_ZOMBIE,
- Weight = 2.50,
+ Weight = 2.50,
Price = 1,
Rarity = 0.75,
Model = "models/gibs/hgibs.mdl",
Functions = { },
CamPos = Vector(15,10,0),
- CamOrigin = Vector(0,0,2)
+ CamOrigin = Vector(0,0,2)
} )
-item.Register( {
- Name = "Zombie Claw",
+item.Register( {
+ Name = "Zombie Claw",
Description = "This is the claw of a zombie.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_QUEST_ZOMBIE,
- Weight = 2.50,
+ Weight = 2.50,
Price = 1,
Rarity = 0.25,
Model = "models/gibs/antlion_gib_small_1.mdl",
Functions = { },
CamPos = Vector(10,15,5),
- CamOrigin = Vector(0,0,1)
+ CamOrigin = Vector(0,0,1)
} )
-item.Register( {
- Name = "Zombie Spine",
+item.Register( {
+ Name = "Zombie Spine",
Description = "This is the spine of a zombie.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_QUEST_ZOMBIE,
- Weight = 2.50,
+ Weight = 2.50,
Price = 1,
Rarity = 0.25,
Model = "models/gibs/HGIBS_spine.mdl",
Functions = { },
CamPos = Vector(15,15,5),
- CamOrigin = Vector(0,0,2)
+ CamOrigin = Vector(0,0,2)
} )
-item.Register( {
- Name = "Zombie Rib",
+item.Register( {
+ Name = "Zombie Rib",
Description = "This is the rib of a zombie.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_QUEST_ZOMBIE,
- Weight = 2.50,
+ Weight = 2.50,
Price = 1,
Rarity = 0.25,
Model = "models/gibs/HGIBS_rib.mdl",
Functions = { },
CamPos = Vector(10,15,3),
- CamOrigin = Vector(0,0,0)
+ CamOrigin = Vector(0,0,0)
} )
-item.Register( {
- Name = "Zombie Flesh",
+item.Register( {
+ Name = "Zombie Flesh",
Description = "This is a chunk of zombie flesh.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_QUEST_ZOMBIE,
- Weight = 2.50,
+ Weight = 2.50,
Price = 1,
Rarity = 0.25,
Model = "models/props_junk/watermelon01_chunk02a.mdl",
Functions = { },
CamPos = Vector(8,8,5),
- CamOrigin = Vector(0,0,2.5)
+ CamOrigin = Vector(0,0,2.5)
} )]]
diff --git a/gamemode/items/misc_explosive.lua b/gamemode/items/misc_explosive.lua
index 9584feb..eedfa44 100644
--- a/gamemode/items/misc_explosive.lua
+++ b/gamemode/items/misc_explosive.lua
@@ -5,10 +5,10 @@ function FUNC_OXYGEN( ply, id, client, icon )
if icon then return "icon16/arrow_turn_right.png" end
if client then return "Throw" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( Sound( "WeaponFrag.Throw" ) )
-
+
local oxy = ents.Create( "sent_oxygen" )
oxy:SetPos( ply:GetItemDropPos() )
oxy:SetAngles( ply:GetAimVector():Angle() )
@@ -18,7 +18,7 @@ end
function FUNC_DROPOXYGEN( ply, id, drop )
-
+
if not drop then return end
local oxy = ents.Create( "sent_oxygen" )
@@ -31,24 +31,24 @@ function FUNC_DROPOXYGEN( ply, id, drop )
end
-item.Register( {
- Name = "Liquid Oxygen",
+item.Register( {
+ Name = "Liquid Oxygen",
Description = "Highly explosive liquid oxygen.",
TypeOverride = "sent_oxygen",
- Stackable = true,
+ Stackable = true,
Type = ITEM_EXPLOSIVE,
- Weight = 1.50,
+ Weight = 1.50,
Price = 50,
Rarity = 0.95,
Model = "models/props_phx/misc/potato_launcher_explosive.mdl",
Functions = { FUNC_OXYGEN },
DropFunction = FUNC_DROPOXYGEN,
CamPos = Vector(24,0,8),
- CamOrigin = Vector(0,0,6)
+ CamOrigin = Vector(0,0,6)
} )
-item.Register( {
- Name = "Gasoline",
+item.Register( {
+ Name = "Gasoline",
TypeOverride = "sent_fuel_gas",
AllowPickup = true,
CollisionOverride = true,
@@ -58,8 +58,8 @@ item.Register( {
Functions = {}
} )
-item.Register( {
- Name = "Diesel Fuel",
+item.Register( {
+ Name = "Diesel Fuel",
TypeOverride = "sent_fuel_diesel",
AllowPickup = true,
CollisionOverride = true,
@@ -69,8 +69,8 @@ item.Register( {
Functions = {}
} )
-item.Register( {
- Name = "Propane Canister",
+item.Register( {
+ Name = "Propane Canister",
TypeOverride = "sent_propane_canister",
AllowPickup = true,
CollisionOverride = true,
@@ -80,8 +80,8 @@ item.Register( {
Functions = {}
} )
-item.Register( {
- Name = "Propane Tank",
+item.Register( {
+ Name = "Propane Tank",
TypeOverride = "sent_propane_tank",
AllowPickup = true,
CollisionOverride = true,
@@ -91,8 +91,8 @@ item.Register( {
Functions = {}
} )
-item.Register( {
- Name = "Radioactive Waste",
+item.Register( {
+ Name = "Radioactive Waste",
TypeOverride = "sent_barrel_radioactive",
AllowPickup = true,
CollisionOverride = true,
@@ -102,8 +102,8 @@ item.Register( {
Functions = {}
} )
-item.Register( {
- Name = "Toxic Waste",
+item.Register( {
+ Name = "Toxic Waste",
TypeOverride = "sent_barrel_biohazard",
AllowPickup = true,
CollisionOverride = true,
diff --git a/gamemode/items/special.lua b/gamemode/items/special.lua
index 8dbab7f..e398ef7 100644
--- a/gamemode/items/special.lua
+++ b/gamemode/items/special.lua
@@ -6,7 +6,7 @@ function FUNC_ANTIRAD( ply, id, client, icon )
if icon then return "icon16/pill.png" end
if client then return "Inject" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "Weapon_SMG1.Special1" )
ply:SetRadiation( 0 )
@@ -18,66 +18,66 @@ end
if icon then return "icon16/lightbulb.png" end
if client then return "Ignite" end
-
+
ply:RemoveFromInventory( id )
-
+
local prop = ents.Create( "sent_flare" )
prop:SetPos( ply:GetItemDropPos() )
prop:Spawn()
end]]
-item.Register( {
- Name = "Anti-Rad",
+item.Register( {
+ Name = "Anti-Rad",
Description = "Releives all radiation poisoning.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SPECIAL,
- Weight = 0.15,
+ Weight = 0.15,
Price = 10,
Rarity = 0.20,
Model = "models/props_lab/jar01b.mdl",
Functions = { FUNC_ANTIRAD },
CamPos = Vector(-17,-9,0),
- CamOrigin = Vector(0,0,-1)
+ CamOrigin = Vector(0,0,-1)
} )
-item.Register( {
- Name = "Respirator",
+item.Register( {
+ Name = "Respirator",
Description = "Filters out chemicals and radiation.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SPECIAL,
- Weight = 1.75,
+ Weight = 1.75,
Price = 40,
Rarity = 0.95,
Model = "models/items/combine_rifle_cartridge01.mdl",
CamPos = Vector(13,-14,0),
- CamOrigin = Vector(0,0,-1)
+ CamOrigin = Vector(0,0,-1)
} )
---[[item.Register( {
- Name = "Sonar Module",
+--[[item.Register( {
+ Name = "Sonar Module",
Description = "Improves your radar detection range.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SPECIAL,
- Weight = 0.75,
+ Weight = 0.75,
Price = 30,
Rarity = 0.90,
Model = "models/gibs/shield_scanner_gib1.mdl",
Functions = {},
CamPos = Vector(2,-9,7),
- CamOrigin = Vector(0,1,-1)
+ CamOrigin = Vector(0,1,-1)
} )
-item.Register( {
- Name = "Flare",
+item.Register( {
+ Name = "Flare",
Description = "Emits a bright red light.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SPECIAL,
- Weight = 0.35,
+ Weight = 0.35,
Price = 3,
Rarity = 0.10,
Model = "models/props_c17/trappropeller_lever.mdl",
Functions = { FUNC_FLARE },
CamPos = Vector(15,6,5),
- CamOrigin = Vector(0,0,0)
-} )]] \ No newline at end of file
+ CamOrigin = Vector(0,0,0)
+} )]]
diff --git a/gamemode/items/supplies.lua b/gamemode/items/supplies.lua
index 122c6a5..bc74a86 100644
--- a/gamemode/items/supplies.lua
+++ b/gamemode/items/supplies.lua
@@ -6,7 +6,7 @@ function FUNC_ENERGY( ply, id, client, icon )
if icon then return "icon16/cup.png" end
if client then return "Drink" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( table.Random{ "npc/barnacle/barnacle_gulp1.wav", "npc/barnacle/barnacle_gulp2.wav" }, 100, math.random( 90, 110 ) )
ply:AddStamina( 50 )
@@ -18,7 +18,7 @@ function FUNC_HEAL( ply, id, client, icon )
if icon then return "icon16/heart.png" end
if client then return "Use" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "HealthVial.Touch" )
ply:AddHealth( 75 )
@@ -30,7 +30,7 @@ function FUNC_SUPERHEAL( ply, id, client, icon )
if icon then return "icon16/heart.png" end
if client then return "Use" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "HealthVial.Touch" )
ply:AddHealth( 150 )
@@ -42,7 +42,7 @@ function FUNC_BANDAGE( ply, id, client, icon )
if icon then return "icon16/heart.png" end
if client then return "Use" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "Cardboard.Strain" )
ply:SetBleeding( false )
@@ -56,131 +56,131 @@ function FUNC_MUTAGEN( ply, id, client, icon )
if icon then return "icon16/pill.png" end
if client then return "Inject" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "Weapon_SMG1.Special1" )
-
+
if ply:IsInfected() then
-
+
ply:Notice( "Your infection has been cured", GAMEMODE.Colors.Green, 5, 0 )
ply:SetInfected( false )
-
+
end
-
+
local tbl = {}
local inc = 0
-
+
for i=1,math.random(1,3) do
-
+
local rand = math.random(1,5)
-
+
while table.HasValue( tbl, rand ) do
-
+
rand = math.random(1,5)
-
+
end
-
+
table.insert( tbl, rand )
-
+
if rand == 1 then
-
+
ply:Notice( "You feel extremely nauseous", GAMEMODE.Colors.Red, 5, inc * 2 )
-
+
umsg.Start( "Drunk", ply )
umsg.Short( math.random( 10, 20 ) )
umsg.End()
-
+
elseif rand == 2 then
-
+
local rad = math.random(2,5)
-
+
if math.random(1,2) == 1 and ply:GetRadiation() < 1 then
-
+
ply:Notice( "+" .. rad .. " Radiation", GAMEMODE.Colors.Red, 5, inc * 2 )
ply:AddRadiation( rad )
-
+
else
-
+
ply:Notice( "-" .. rad .. " Radiation", GAMEMODE.Colors.Green, 5, inc * 2 )
ply:AddRadiation( -rad )
-
+
end
-
+
elseif rand == 3 then
-
+
ply:Notice( "Your whole body aches", GAMEMODE.Colors.Red, 5, inc * 2 )
-
+
local dmg = math.random(2,5)
-
+
ply:AddHealth( dmg * -10 )
-
+
elseif rand == 4 then
-
+
if math.random(1,2) == 1 then
-
+
ply:Notice( "You feel exhausted", GAMEMODE.Colors.Red, 5, inc * 2 )
ply:AddStamina( -50 )
-
+
else
-
+
ply:Notice( "+20 Stamina", GAMEMODE.Colors.Green, 5, inc * 2 )
ply:AddStamina( 20 )
-
+
end
-
+
elseif rand == 5 then
-
+
ply:Notice( "Your legs begin to feel weak", GAMEMODE.Colors.Red, 5, inc * 2 )
ply:SetWalkSpeed( GAMEMODE.WalkSpeed - 80 )
ply:SetRunSpeed( GAMEMODE.RunSpeed - 80 )
-
+
local legtime = math.random( 20, 40 )
-
+
timer.Simple( legtime - 5, function() if IsValid( ply ) and ply:Team() == TEAM_ARMY then ply:Notice( "Your legs start to feel better", GAMEMODE.Colors.Green, 5 ) end end )
timer.Simple( legtime, function() if IsValid( ply ) and ply:Team() == TEAM_ARMY then ply:SetWalkSpeed( GAMEMODE.WalkSpeed ) ply:SetRunSpeed( GAMEMODE.RunSpeed ) end end )
-
+
end
-
+
inc = inc + 1
-
+
end
end
-item.Register( {
- Name = "Energy Drink",
+item.Register( {
+ Name = "Energy Drink",
Description = "Restores 50 stamina.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SUPPLY,
- Weight = 0.25,
+ Weight = 0.25,
Price = 5,
Rarity = 0.25,
Model = "models/props_junk/popcan01a.mdl",
Functions = { FUNC_ENERGY },
CamPos = Vector(10,10,0),
- CamOrigin = Vector(0,0,0)
+ CamOrigin = Vector(0,0,0)
} )
-item.Register( {
- Name = "Basic Medikit",
+item.Register( {
+ Name = "Basic Medikit",
Description = "Restores 50% of your health.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SUPPLY,
- Weight = 1.25,
+ Weight = 1.25,
Price = 10,
Rarity = 0.65,
Model = "models/radbox/healthpack.mdl",
Functions = { FUNC_HEAL },
CamPos = Vector(23,8,3),
- CamOrigin = Vector(0,0,-1)
+ CamOrigin = Vector(0,0,-1)
} )
-item.Register( {
- Name = "Advanced Medikit",
+item.Register( {
+ Name = "Advanced Medikit",
Description = "Restores 100% of your health.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SUPPLY,
- Weight = 1.25,
+ Weight = 1.25,
Price = 20,
Rarity = 0.85,
Model = "models/radbox/healthpack2.mdl",
@@ -189,12 +189,12 @@ item.Register( {
CamOrigin = Vector(0,0,-1)
} )
-item.Register( {
- Name = "Alpha Mutagen",
+item.Register( {
+ Name = "Alpha Mutagen",
Description = "Prototype drug which cures the infection.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SUPPLY,
- Weight = 1.25,
+ Weight = 1.25,
Price = 50,
Rarity = 0.95,
Model = "models/items/healthkit.mdl",
@@ -203,12 +203,12 @@ item.Register( {
CamOrigin = Vector(4,0,0)
} )
-item.Register( {
- Name = "Bandage",
+item.Register( {
+ Name = "Bandage",
Description = "Stops all bleeding.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_SUPPLY,
- Weight = 0.35,
+ Weight = 0.35,
Price = 5,
Rarity = 0.50,
Model = "models/radbox/bandage.mdl",
@@ -216,4 +216,3 @@ item.Register( {
CamPos = Vector(18,10,5),
CamOrigin = Vector(0,0,0)
} )
-
diff --git a/gamemode/items/weapons_common.lua b/gamemode/items/weapons_common.lua
index a32f498..11febb3 100644
--- a/gamemode/items/weapons_common.lua
+++ b/gamemode/items/weapons_common.lua
@@ -6,31 +6,31 @@ function FUNC_DROPWEAPON( ply, id, client, icon )
if icon then return "icon16/arrow_down.png" end
if client then return "Drop" end
-
+
local tbl = item.GetByID( id )
-
+
local prop = ents.Create( "sent_droppedgun" )
prop:SetPos( ply:GetItemDropPos() )
-
+
if tbl.DropModel then
-
+
prop:SetModel( tbl.DropModel )
-
+
else
-
+
prop:SetModel( tbl.Model )
-
+
end
-
+
prop:Spawn()
-
+
ply:EmitSound( Sound( "items/ammopickup.wav" ) )
ply:RemoveFromInventory( id )
-
+
if not ply:HasItem( id ) then
-
+
ply:StripWeapon( tbl.Weapon )
-
+
end
end
@@ -38,11 +38,11 @@ end
function FUNC_REMOVEWEAPON( ply, id )
local tbl = item.GetByID( id )
-
+
if not ply:HasItem( id ) then
-
+
ply:StripWeapon( tbl.Weapon )
-
+
end
end
@@ -50,20 +50,20 @@ end
function FUNC_GRABWEAPON( ply, id )
local tbl = item.GetByID( id )
-
+
ply:Give( tbl.Weapon )
-
+
return true
end
-item.Register( {
- Name = "Hammer",
+item.Register( {
+ Name = "Hammer",
Description = "Builds barricades and bashes skulls.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 3,
+ Weight = 3,
Price = 35,
Rarity = 0.40,
Model = "models/weapons/w_hammer.mdl",
@@ -75,13 +75,13 @@ item.Register( {
CamOrigin = Vector(0,0,5)
} )
-item.Register( {
- Name = "Axe",
+item.Register( {
+ Name = "Axe",
Description = "The messiest melee weapon.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 5,
+ Weight = 5,
Price = 50,
Rarity = 0.60,
Model = "models/weapons/w_axe.mdl",
@@ -93,14 +93,14 @@ item.Register( {
CamOrigin = Vector(0,0,8)
} )
-item.Register( {
- Name = "Crowbar",
+item.Register( {
+ Name = "Crowbar",
Description = "Gordon's weapon of choice.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
SaleOverride = true,
- Weight = 5,
+ Weight = 5,
Price = 50,
Rarity = 0.20,
Model = "models/weapons/w_crowbar.mdl",
@@ -112,14 +112,14 @@ item.Register( {
CamOrigin = Vector(0,0,8)
} )
-item.Register( {
- Name = "FN Five-Seven",
+item.Register( {
+ Name = "FN Five-Seven",
Description = "A standard issue sidearm.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
SaleOverride = true,
- Weight = 3,
+ Weight = 3,
Price = 8,
Rarity = 0.90,
Model = "models/weapons/w_pist_fiveseven.mdl",
@@ -131,14 +131,14 @@ item.Register( {
CamOrigin = Vector(2,0,3)
} )
-item.Register( {
- Name = "USP Compact",
+item.Register( {
+ Name = "USP Compact",
Description = "A standard issue sidearm.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
SaleOverride = true,
- Weight = 3,
+ Weight = 3,
Price = 8,
Rarity = 0.90,
Model = "models/weapons/w_pistol.mdl",
@@ -150,14 +150,14 @@ item.Register( {
CamOrigin = Vector(-1,0,-2)
} )
-item.Register( {
- Name = "P228 Compact",
+item.Register( {
+ Name = "P228 Compact",
Description = "A standard issue sidearm.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
SaleOverride = true,
- Weight = 3,
+ Weight = 3,
Price = 8,
Rarity = 0.90,
Model = "models/weapons/w_pist_p228.mdl",
@@ -169,14 +169,14 @@ item.Register( {
CamOrigin = Vector(2,0,3)
} )
-item.Register( {
- Name = "Glock 19",
+item.Register( {
+ Name = "Glock 19",
Description = "A standard issue sidearm.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
SaleOverride = true,
- Weight = 3,
+ Weight = 3,
Price = 8,
Rarity = 0.90,
Model = "models/weapons/w_pist_glock18.mdl",
@@ -188,13 +188,13 @@ item.Register( {
CamOrigin = Vector(2,0,3)
} )
-item.Register( {
- Name = "Dual Berettas",
+item.Register( {
+ Name = "Dual Berettas",
Description = "A gun for each hand.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 3,
+ Weight = 3,
Price = 35,
Rarity = 0.20,
Model = "models/weapons/w_pist_elite_single.mdl",
@@ -207,13 +207,13 @@ item.Register( {
CamOrigin = Vector(2,0,3)
} )
-item.Register( {
- Name = "Colt Python",
+item.Register( {
+ Name = "Colt Python",
Description = "A six shooter that packs a punch.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 4,
+ Weight = 4,
Price = 40,
Rarity = 0.20,
Model = "models/weapons/w_357.mdl",
@@ -225,13 +225,13 @@ item.Register( {
CamOrigin = Vector(6,0,0)
} )
-item.Register( {
- Name = "Desert Eagle",
+item.Register( {
+ Name = "Desert Eagle",
Description = "What are you compensating for?",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 4,
+ Weight = 4,
Price = 45,
Rarity = 0.20,
Model = "models/weapons/w_pist_deagle.mdl",
@@ -243,13 +243,13 @@ item.Register( {
CamOrigin = Vector(3,0,4)
} )
-item.Register( {
- Name = "MAC-10",
+item.Register( {
+ Name = "MAC-10",
Description = "A compact SMG with moderate recoil.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 4,
+ Weight = 4,
Price = 50,
Rarity = 0.20,
Model = "models/weapons/w_smg_mac10.mdl",
@@ -261,13 +261,13 @@ item.Register( {
CamOrigin = Vector(2,0,3)
} )
-item.Register( {
- Name = "UMP45",
+item.Register( {
+ Name = "UMP45",
Description = "A powerful SMG with a smaller magazine.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 6,
+ Weight = 6,
Price = 55,
Rarity = 0.30,
Model = "models/weapons/w_smg_ump45.mdl",
@@ -279,13 +279,13 @@ item.Register( {
CamOrigin = Vector(-2,0,4)
} )
-item.Register( {
- Name = "CMP250",
+item.Register( {
+ Name = "CMP250",
Description = "A prototype burst-fire SMG.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 4,
+ Weight = 4,
Price = 60,
Rarity = 0.30,
Model = "models/weapons/w_smg1.mdl",
@@ -297,13 +297,13 @@ item.Register( {
CamOrigin = Vector(-1,0,-1)
} )
-item.Register( {
- Name = "Winchester 1887",
+item.Register( {
+ Name = "Winchester 1887",
Description = "Zombies are in season.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 6,
+ Weight = 6,
Price = 65,
Rarity = 0.30,
Model = "models/weapons/w_annabelle.mdl",
@@ -315,13 +315,13 @@ item.Register( {
CamOrigin = Vector(3,0,1)
} )
-item.Register( {
- Name = "TMP",
+item.Register( {
+ Name = "TMP",
Description = "A silent but deadly SMG.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 4,
+ Weight = 4,
Price = 70,
Rarity = 0.40,
Model = "models/weapons/w_smg_tmp.mdl",
@@ -333,13 +333,13 @@ item.Register( {
CamOrigin = Vector(5,0,3)
} )
-item.Register( {
- Name = "MP5",
+item.Register( {
+ Name = "MP5",
Description = "A well-rounded, reliable SMG.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 6,
+ Weight = 6,
Price = 75,
Rarity = 0.40,
Model = "models/weapons/w_smg_mp5.mdl",
@@ -351,13 +351,13 @@ item.Register( {
CamOrigin = Vector(2,0,5)
} )
-item.Register( {
- Name = "FAMAS",
+item.Register( {
+ Name = "FAMAS",
Description = "The least expensive assault rifle.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 9,
+ Weight = 9,
Price = 80,
Rarity = 0.50,
Model = "models/weapons/w_rif_famas.mdl",
@@ -369,13 +369,13 @@ item.Register( {
CamOrigin = Vector(-6,0,5)
} )
-item.Register( {
- Name = "FN P90",
+item.Register( {
+ Name = "FN P90",
Description = "A powerful SMG with a large magazine.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 4,
+ Weight = 4,
Price = 85,
Rarity = 0.50,
Model = "models/weapons/w_smg_p90.mdl",
@@ -387,13 +387,13 @@ item.Register( {
CamOrigin = Vector(1,0,5)
} )
-item.Register( {
- Name = "Steyr Scout",
+item.Register( {
+ Name = "Steyr Scout",
Description = "A bolt-action sniper rifle.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 9,
+ Weight = 9,
Price = 90,
Rarity = 0.60,
Model = "models/weapons/w_snip_scout.mdl",
@@ -405,13 +405,13 @@ item.Register( {
CamOrigin = Vector(0,0,4)
} )
-item.Register( {
- Name = "IMI Galil",
+item.Register( {
+ Name = "IMI Galil",
Description = "Lower accuracy, larger magazine.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 8,
+ Weight = 8,
Price = 100,
Rarity = 0.60,
Model = "models/weapons/w_rif_galil.mdl",
@@ -423,13 +423,13 @@ item.Register( {
CamOrigin = Vector(-1,0,3)
} )
-item.Register( {
- Name = "SPAS-12",
+item.Register( {
+ Name = "SPAS-12",
Description = "Useful for crowd control.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 7,
+ Weight = 7,
Price = 110,
Rarity = 0.70,
Model = "models/weapons/w_shotgun.mdl",
@@ -441,13 +441,13 @@ item.Register( {
CamOrigin = Vector(0,0,0)
} )
-item.Register( {
- Name = "AK-47",
+item.Register( {
+ Name = "AK-47",
Description = "A well-rounded assault rifle.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 7,
+ Weight = 7,
Price = 130,
Rarity = 0.80,
Model = "models/weapons/w_rif_ak47.mdl",
@@ -459,13 +459,13 @@ item.Register( {
CamOrigin = Vector(0,0,3)
} )
-item.Register( {
- Name = "SG 552",
+item.Register( {
+ Name = "SG 552",
Description = "Comes with a free scope.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 8,
+ Weight = 8,
Price = 150,
Rarity = 0.90,
Model = "models/weapons/w_rif_sg552.mdl",
@@ -477,13 +477,13 @@ item.Register( {
CamOrigin = Vector(-4,0,5)
} )
-item.Register( {
- Name = "G3 SG1",
+item.Register( {
+ Name = "G3 SG1",
Description = "An automatic sniper rifle.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 9,
+ Weight = 9,
Price = 170,
Rarity = 0.90,
Model = "models/weapons/w_snip_g3sg1.mdl",
@@ -495,13 +495,13 @@ item.Register( {
CamOrigin = Vector(-3,0,5)
} )
-item.Register( {
- Name = "HEAT Cannon",
+item.Register( {
+ Name = "HEAT Cannon",
Description = "An experimental long range zombie cooker.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 9,
+ Weight = 9,
Price = 190,
Rarity = 0.70,
Model = "models/weapons/w_physics.mdl",
@@ -513,13 +513,13 @@ item.Register( {
CamOrigin = Vector(10,0,-1)
} )
-item.Register( {
- Name = "PPW-952",
+item.Register( {
+ Name = "PPW-952",
Description = "An experimental particle projectile weapon.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_COMMON,
TypeOverride = "sent_droppedgun",
- Weight = 9,
+ Weight = 9,
Price = 200,
Rarity = 0.70,
Model = "models/weapons/w_irifle.mdl",
diff --git a/gamemode/items/weapons_special.lua b/gamemode/items/weapons_special.lua
index 3d9a6c3..5f4b1b5 100644
--- a/gamemode/items/weapons_special.lua
+++ b/gamemode/items/weapons_special.lua
@@ -5,16 +5,16 @@ ITEM_WPN_SPECIAL = 10
--[[function FUNC_PLANTBOMB( ply, id, client )
if client then return "Arm" end
-
+
ply:RemoveFromInventory( id )
ply:EmitSound( "weapons/c4/c4_plant.wav" )
-
+
local trace = {}
trace.start = ply:GetShootPos()
trace.endpos = ply:GetShootPos() + ply:GetAimVector() * 50
trace.filter = ply
local tr = util.TraceLine( trace )
-
+
local bomb = ents.Create( "sent_c4" )
bomb:SetPos( tr.HitPos )
bomb:SetOwner( ply )
@@ -22,13 +22,13 @@ ITEM_WPN_SPECIAL = 10
end]]
-item.Register( {
- Name = "M1014",
+item.Register( {
+ Name = "M1014",
Description = "Turn everything into ground beef.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_SPECIAL,
TypeOverride = "sent_droppedgun",
- Weight = 7,
+ Weight = 7,
Price = 160,
Rarity = 0.90,
Model = "models/weapons/w_shot_xm1014.mdl",
@@ -40,13 +40,13 @@ item.Register( {
CamOrigin = Vector(1,0,4)
} )
-item.Register( {
- Name = "M249",
+item.Register( {
+ Name = "M249",
Description = "A belt-fed support machine gun.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_SPECIAL,
TypeOverride = "sent_droppedgun",
- Weight = 10,
+ Weight = 10,
Price = 180,
Rarity = 0.90,
Model = "models/weapons/w_mach_m249para.mdl",
@@ -58,13 +58,13 @@ item.Register( {
CamOrigin = Vector(2,0,6)
} )
-item.Register( {
- Name = "AWP",
+item.Register( {
+ Name = "AWP",
Description = "The very definition of overkill.",
- Stackable = false,
+ Stackable = false,
Type = ITEM_WPN_SPECIAL,
TypeOverride = "sent_droppedgun",
- Weight = 9,
+ Weight = 9,
Price = 200,
Rarity = 0.70,
Model = "models/weapons/w_snip_awp.mdl",
@@ -76,13 +76,13 @@ item.Register( {
CamOrigin = Vector(1,0,4)
} )
-item.Register( {
- Name = "HE Grenade",
+item.Register( {
+ Name = "HE Grenade",
Description = "The fuse lasts 3 seconds.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_WPN_SPECIAL,
TypeOverride = "sent_droppedgun",
- Weight = 1,
+ Weight = 1,
Price = 5,
Rarity = 0.20,
Model = "models/weapons/w_eq_fraggrenade_thrown.mdl",
@@ -94,13 +94,13 @@ item.Register( {
CamOrigin = Vector(0,0,1)
} )
-item.Register( {
- Name = "Incendiary Grenade",
+item.Register( {
+ Name = "Incendiary Grenade",
Description = "Comes with free marshmallows.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_WPN_SPECIAL,
TypeOverride = "sent_droppedgun",
- Weight = 1,
+ Weight = 1,
Price = 8,
Rarity = 0.40,
Model = "models/weapons/w_eq_flashbang.mdl",
@@ -112,17 +112,17 @@ item.Register( {
CamOrigin = Vector(0,0,5)
} )
---[[item.Register( {
- Name = "Timed Explosives",
+--[[item.Register( {
+ Name = "Timed Explosives",
Description = "This is a homemade timed explosive.",
- Stackable = true,
+ Stackable = true,
Type = ITEM_WPN_SPECIAL,
TypeOverride = "sent_droppedgun",
- Weight = 3,
+ Weight = 3,
Price = 10,
Rarity = 0.80,
Model = "models/weapons/w_c4.mdl",
Functions = { FUNC_PLANTBOMB },
CamPos = Vector(-12,-2,0),
CamOrigin = Vector(0,5,0)
-} )]] \ No newline at end of file
+} )]]