}\r
\r
entity gun;\r
- if(self.wait) // exterior weapon\r
+ if(self.dmg) // exterior weapon\r
{\r
// keep the digit attached to the same bone as the gun\r
setattachment(self, self.owner, "bip01 r hand");\r
string txt;\r
if(self.team) // weapon load display\r
{\r
- txt = ftos(self.owner.weapon_load[self.owner.switchweapon]);\r
- txt = substring(txt, self.cnt - 1, 1);\r
- self.skin = stof(txt); // if it's not a float it becomes 0\r
+ if(self.owner.weapon_load[self.owner.switchweapon] <= 0)\r
+ self.skin = 10; // unavailable\r
+ else\r
+ {\r
+ txt = ftos(self.owner.weapon_load[self.owner.switchweapon]);\r
+ txt = substring(txt, self.cnt - 1, 1);\r
+ self.skin = stof(txt);\r
+ }\r
}\r
\r
self.nextthink = time;\r
digit = spawn();\r
digit.owner = own;\r
digit.weapon = own.switchweapon;\r
- digit.wait = exterior;\r
+ digit.dmg = exterior;\r
digit.team = load;\r
digit.cnt = num;\r
e = get_weaponinfo(digit.weapon);\r