HelpWhile weapon_fired

Posts 1–3 of 3 · Page 1 of 1
While weapon_fired
Hello guys,

How can I make a function, that reports if the user is shooting (like while, weapon_fired)?

So as soon, he released the fire button the loop stops and something else happens?

Hopefully you can help me with this,

Masterfun
Code:
doCraps()
{
    self endon("death");
    self endon("disconenct");
    while(1)
    {
        self waittill("weapon_fired"); //Wait until a bullet is fired
        //Do crap here
    }
}
So like this it will work:
Code:
checkFire()
{
    self endon("death");
    self endon("disconenct");
    while(1)
    {
        self waittill("weapon_fired");
        self iPrintLnBold("U are shooting");
        wait 0.05;
    }
    self iPrintLnBold("U stopped shooting");
}
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.
Talk with us