Mk, so Tig's example didnt work as well as I would have hoped, might just be me. Here is what I'm working with:
Initially this.on = false and this.delay = 1;
PHP Code:
function onWeaponFired() {
this.on = true;
doGani();
onTimeout();
}
function onTimeout() {
if (keydown2(getkeycode("f"), true)) {
this.delay++;
}
if(this.delay > 1) { //check if semi or auto
//ammo check here
freezeplayer(.1);
setani("gunganishere", "");
temp.angle = getangle(vecx(player.dir), vecy(player.dir));
setshootparams(STUFF GOES HERE);
setShootCoords();
shoot(this.shootcoords[0],this.shootcoords[1], player.z, random(temp.angle, (temp.angle + this.accuracy) * .4),NULL, NULL, "blueball3", "");
this.delay = 0;
}
setTimer(.1);
}