1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
ITEM_EXPLOSIVE = 345
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() )
oxy:Spawn()
end
function FUNC_DROPOXYGEN( ply, id, drop )
if not drop then return end
local oxy = ents.Create( "sent_oxygen" )
oxy:SetSpeed( 10 )
oxy:SetPos( ply:GetItemDropPos() )
oxy:SetAngles( ply:GetAimVector():Angle() )
oxy:Spawn()
return false // override spawning a prop for this item
end
item.Register( {
Name = "Liquid Oxygen",
Description = "Highly explosive liquid oxygen.",
TypeOverride = "sent_oxygen",
Stackable = true,
Type = ITEM_EXPLOSIVE,
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)
} )
item.Register( {
Name = "Gasoline",
TypeOverride = "sent_fuel_gas",
AllowPickup = true,
CollisionOverride = true,
Type = ITEM_EXPLOSIVE,
Rarity = 0.50,
Model = "models/props_junk/gascan001a.mdl",
Functions = {}
} )
item.Register( {
Name = "Diesel Fuel",
TypeOverride = "sent_fuel_diesel",
AllowPickup = true,
CollisionOverride = true,
Type = ITEM_EXPLOSIVE,
Rarity = 0.50,
Model = "models/props_junk/metalgascan.mdl",
Functions = {}
} )
item.Register( {
Name = "Propane Canister",
TypeOverride = "sent_propane_canister",
AllowPickup = true,
CollisionOverride = true,
Type = ITEM_EXPLOSIVE,
Rarity = 0.50,
Model = "models/props_junk/propane_tank001a.mdl",
Functions = {}
} )
item.Register( {
Name = "Propane Tank",
TypeOverride = "sent_propane_tank",
AllowPickup = true,
CollisionOverride = true,
Type = ITEM_EXPLOSIVE,
Rarity = 0.50,
Model = "models/props_junk/propanecanister001a.mdl",
Functions = {}
} )
item.Register( {
Name = "Radioactive Waste",
TypeOverride = "sent_barrel_radioactive",
AllowPickup = true,
CollisionOverride = true,
Type = ITEM_EXPLOSIVE,
Rarity = 0.10,
Model = "models/props/de_train/barrel.mdl",
Functions = {}
} )
item.Register( {
Name = "Toxic Waste",
TypeOverride = "sent_barrel_biohazard",
AllowPickup = true,
CollisionOverride = true,
Type = ITEM_EXPLOSIVE,
Rarity = 0.10,
Model = "models/props/de_train/barrel.mdl",
Functions = {}
} )
|