ok, but you shouldn't use toweapons anymore unless you're only practicing offline.
Online this could be accomplished like so:
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
shoot(player.x + 1.5 + vecx(player.dir), player.y + 2 + vecy(player.dir), player.z, (playerdir + 1) * pi / 2, NULL, NULL, "dg_bullet", NULL);
setani("dg_m16-fire", NULL);
freezeplayer(0.25);
}
function onActionProjectile() {
player.hearts -= 3;
}
Cheers.