5 #include <common/t_items.qh>
9 PROPERTY(float, g_pickup_ammo_anyway);
14 ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), ammo_pickupevalfunc);
15 ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo));
16 ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo));
17 ATTRIB(Ammo, m_pickupanyway, float(), GET(g_pickup_ammo_anyway));
23 MODEL(Bullets_ITEM, Item_Model("a_bullets.mdl"));
27 PROPERTY(int, g_pickup_nails);
28 void ammo_bullets_init(entity item)
31 item.ammo_nails = g_pickup_nails;
34 REGISTER_ITEM(Bullets, Ammo) {
36 this.m_model = MDL_Bullets_ITEM;
38 this.netname = "bullets";
39 this.m_name = "bullets";
40 this.m_icon = "ammo_bullets";
42 this.m_botvalue = 1500;
43 this.m_itemid = IT_NAILS;
44 this.m_iteminit = ammo_bullets_init;
49 MODEL(Cells_ITEM, Item_Model("a_cells.md3"));
53 PROPERTY(int, g_pickup_cells);
54 void ammo_cells_init(entity item)
57 item.ammo_cells = g_pickup_cells;
60 REGISTER_ITEM(Cells, Ammo) {
62 this.m_model = MDL_Cells_ITEM;
64 this.netname = "cells";
65 this.m_name = "cells";
66 this.m_icon = "ammo_cells";
68 this.m_botvalue = 1500;
69 this.m_itemid = IT_CELLS;
70 this.m_iteminit = ammo_cells_init;
75 MODEL(Plasma_ITEM, Item_Model("a_cells.md3"));
79 PROPERTY(int, g_pickup_plasma);
80 void ammo_plasma_init(entity item)
83 item.ammo_plasma = g_pickup_plasma;
86 REGISTER_ITEM(Plasma, Ammo) {
88 this.m_model = MDL_Plasma_ITEM;
90 this.netname = "plasma";
91 this.m_name = "plasma";
92 this.m_icon = "ammo_plasma";
94 this.m_botvalue = 1500;
95 this.m_itemid = IT_PLASMA;
96 this.m_iteminit = ammo_plasma_init;
101 MODEL(Rockets_ITEM, Item_Model("a_rockets.md3"));
105 PROPERTY(int, g_pickup_rockets);
106 void ammo_rockets_init(entity item)
108 if(!item.ammo_rockets)
109 item.ammo_rockets = g_pickup_rockets;
112 REGISTER_ITEM(Rockets, Ammo) {
114 this.m_model = MDL_Rockets_ITEM;
116 this.netname = "rockets";
117 this.m_name = "rockets";
118 this.m_icon = "ammo_rockets";
120 this.m_botvalue = 1500;
121 this.m_itemid = IT_ROCKETS;
122 this.m_iteminit = ammo_rockets_init;
127 MODEL(Shells_ITEM, Item_Model("a_shells.md3"));
131 PROPERTY(int, g_pickup_shells);
132 void ammo_shells_init(entity item)
134 if(!item.ammo_shells)
135 item.ammo_shells = g_pickup_shells;
138 REGISTER_ITEM(Shells, Ammo) {
140 this.m_model = MDL_Shells_ITEM;
142 this.netname = "shells";
143 this.m_name = "shells";
144 this.m_icon = "ammo_shells";
146 this.m_botvalue = 1000;
147 this.m_itemid = IT_SHELLS;
148 this.m_iteminit = ammo_shells_init;