Whoever has that gun will be able to get hit, everyone who doesn't won't.
You need to take the actionProjectile code out of the gun and put it in it's own script called, -System/Damage or something and then make sure everyone has it.
Your gun script:
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.firerate = .2;
}
function onWeaponFired() {
while (keydown(4)) {
FireGun();
sleep(this.firerate);
}
}
function FireGun() {
setani("millenium_scar-fire", "");
this.spread=.053;
this.speed=5;
this.reload=50;
this.load=50;
temp.angl = getangle(vecx(player.dir), vecy(player.dir))+random(this.spread*-1,this.spread);
shoot(player.x + 0.5 + vecx(player.dir), player.y + vecy(player.dir), player.z, temp.angl, 0, 0, "mil_bullets", player.dir);
}
-System/Damage:
PHP Code:
//#CLIENTSIDE
function onActionProjectile() {
if (clientr.hp>=0) {
setani("hurt", "");
}
}