Coz in my progs.dat i add the Flashlight and give them an 10sec interval then turn it off
i build with csqc an new Hud so i Need a extern Float from the Progs.dat
here an Image of my new Hud for my Mod.
This code i use at Moment in "hud.qc->drawHud ()":
Code: Select all
hud_size = '56 11 0';
if (time > self.flash_time)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight0.tga", hud_size, '1 1 1', .6, 0);
else {
if (time > self.flash_time - 1)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight0.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 2)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight1.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 3)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight2.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 4)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight3.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 5)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight4.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 6)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight5.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 7)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight6.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 8)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight7.tga", hud_size, '1 1 1', .6, 0);
else if (time > self.flash_time - 9)
drawpic (hud_pos, "progs/csqc/hud/flashlight/flashlight8.tga", hud_size, '1 1 1', .6, 0);
}