8 if (other.classname != "player" && other.classname != "bot")
10 if (other.health <= 0)
14 other.ammo_shells = min (other.ammo_shells + self.ammo_shells, 100);
16 other.ammo_nails = min (other.ammo_nails + self.ammo_nails, 200);
17 if (self.ammo_rockets)
18 other.ammo_rockets = min (other.ammo_rockets + self.ammo_rockets, 100);
20 other.ammo_cells = min (other.ammo_cells + self.ammo_cells, 100);
22 if (self.flags & FL_WEAPON)
24 if (self.items & IT_UZI) W_GiveWeapon (other, IT_UZI);
25 else if (self.items & IT_SHOTGUN) W_GiveWeapon (other, IT_SHOTGUN);
26 else if (self.items & IT_GRENADE_LAUNCHER) W_GiveWeapon (other, IT_GRENADE_LAUNCHER);
27 else if (self.items & IT_ELECTRO) W_GiveWeapon (other, IT_ELECTRO);
28 else if (self.items & IT_NEX) W_GiveWeapon (other, IT_NEX);
29 else if (self.items & IT_HAGAR) W_GiveWeapon (other, IT_HAGAR);
30 else if (self.items & IT_ROCKET_LAUNCHER) W_GiveWeapon (other, IT_ROCKET_LAUNCHER);
31 else if (self.items & IT_CRYLINK) W_GiveWeapon (other, IT_CRYLINK);
35 other.health = min (other.health + self.max_health, 250);
37 if (other.classname == "player")
39 sprint (other, "You got the ");
40 sprint (other, self.netname);
52 sound (self, CHAN_BODY, "weapons/WeaponPickup.wav", 1, ATTN_NORM);
59 self.flags = self.flags | FL_ITEM;
60 setmodel (self, self.mdl);
61 setsize (self, '-8 -8 -8', '8 8 8');
62 self.movetype = MOVETYPE_TOSS;
63 self.solid = SOLID_TRIGGER;
64 self.touch = Item_Touch;
67 void StartWeapon (void)
69 self.flags = FL_ITEM | FL_WEAPON;
70 setmodel (self, self.mdl);
71 setsize (self, '-12 -12 -12', '12 12 12');
72 self.movetype = MOVETYPE_TOSS;
73 self.solid = SOLID_TRIGGER;
74 self.touch = Item_Touch;
77 void weapon_uzi (void)
79 self.mdl = "models/weapons/g_uzi.md3";
86 void weapon_shotgun (void)
88 self.mdl = "models/weapons/g_shotgun.md3";
89 self.items = IT_SHOTGUN;
90 self.ammo_shells = 10;
91 self.netname = "Shotgun";
95 void weapon_grenadelauncher (void)
97 self.mdl = "models/weapons/g_gl.md3";
98 self.items = IT_GRENADE_LAUNCHER;
99 self.ammo_rockets = 3;
100 self.netname = "Grenade Launcher";
104 void weapon_electro (void)
106 self.mdl = "models/weapons/g_electro.md3";
107 self.items = IT_ELECTRO;
108 self.ammo_cells = 10;
109 self.netname = "Electro";
113 void weapon_crylink (void)
115 self.mdl = "models/weapons/g_crylink.md3";
116 self.items = IT_CRYLINK;
117 self.ammo_cells = 10;
118 self.netname = "Crylink";
122 void weapon_nex (void)
124 self.mdl = "models/weapons/g_nex.md3";
126 self.ammo_cells = 10;
127 self.netname = "Nex Gun";
131 void weapon_hagar (void)
133 self.mdl = "models/weapons/g_hagar.md3";
134 self.items = IT_HAGAR;
135 self.ammo_rockets = 6;
136 self.netname = "Hagar";
140 void weapon_rocketlauncher (void)
142 self.mdl = "models/weapons/g_rl.md3";
143 self.items = IT_ROCKET_LAUNCHER;
144 self.ammo_rockets = 5;
145 self.netname = "Rocket Launcher";
149 void item_rockets (void)
151 self.mdl = "models/items/a_rockets.md3";
152 self.ammo_rockets = 25;
153 self.netname = "rockets";
157 void item_bullets (void)
159 self.mdl = "models/items/a_bullets.zym";
160 self.ammo_nails = 100;
161 self.netname = "bullets";
165 void item_cells (void)
167 self.mdl = "models/items/a_cells.md3";
168 self.ammo_cells = 50;
169 self.netname = "cells";
173 void item_shells (void)
175 self.mdl = "models/items/a_shells.md3";
176 self.ammo_shells = 50;
177 self.netname = "shells";
181 void item_strength (void)
183 self.mdl = "models/items/g_strength.zym";
184 self.items = IT_STRENGTH;
185 self.netname = "Strength Powerup";
189 void item_invincible (void)
191 self.mdl = "models/items/g_invincible.zym";
192 self.items = IT_INVINCIBLE;
193 self.netname = "Invulnerability";
197 void item_speed (void)
199 self.mdl = "models/items/g_speed.zym";
200 self.items = IT_SPEED;
201 self.netname = "Speed Powerup";
205 void item_slowmo (void)
207 self.mdl = "models/items/g_slowmo.zym";
208 self.items = IT_SLOWMO;
209 self.netname = "Slow Motion!";
213 void item_armor1 (void)
215 self.mdl = "models/items/g_a1.md3";
217 self.netname = "Armor Shard";
221 void item_armor25 (void)
223 self.mdl = "models/items/g_a25.md3";
224 self.armorvalue = 25;
225 self.netname = "Armor";
229 void item_health1 (void)
231 self.mdl = "models/items/g_h1.md3";
233 self.netname = "1 health";
237 void item_health25 (void)
239 self.mdl = "models/items/g_h25.md3";
240 self.max_health = 25;
241 self.netname = "25 health";
245 void item_health100 (void)
247 self.mdl = "models/items/g_h100.md3";
248 self.max_health = 100;
249 self.netname = "100 health";
253 void misc_models (void)
255 precache_model (self.model);
256 setmodel (self, self.model);
257 setsize (self, self.mins, self.maxs);