Sorry, I am not good with scripts (I understand and I can edit, but "create" scripts is another stuff).
Thank you.
Mods
Change firing sound
Change firing sound
1

play command. ### Shotgun
id=110
name=Shotgun
group=weapon
icon=gfx\shotgun.bmp
model=gfx\shotgun.b3d
scale=0.335
behaviour=gun
range=120
rate=800
mat=metal
weight=2500
info=this gun causes a lot of damage but it has only a very small range
damage=10
healthchange=0
script=start
	on:attack1 {
		if (gety("unit",1)<-15){
			skipevent;
			speech "negative";
		}else{
			if (playergotitem(29)>0) { play "shotgun.wav"; }
		}
	}
	on:impact {
		$tmp=impact_class();
		$tmp2=impact_id();
		//+100 Bonus Damage on Flesh
		if (compare_material($tmp,$tmp2,"flesh")==1){
			damage $tmp,$tmp2,100;
		//+100 Bonus Damage on Fruit
		} elseif (compare_material($tmp,$tmp2,"fruit")==1){
			damage $tmp,$tmp2,100;
		//+200 Bonus Damage on Glass
		} elseif (compare_material($tmp,$tmp2,"glass")==1){
			damage $tmp,$tmp2,200;
		}
		freevar $tmp;
		freevar $tmp2;
	}
	on:inhand {
		play "crack1.wav";
	}
	on:noammo {
		speech "negative";
		msg "No ammo!",3;
	}
script=end
### my gun
id=...
name=my gun
group=weapon
icon=gfx\mygun.bmp
model=gfx\mygun.b3d
scale=0.335
behaviour=gun
range=120
rate=800
mat=metal
weight=2500
info=this gun causes a lot of damage but it has only a very small range
damage=10
healthchange=0
script=start
	on:attack1 {
		if (gety("unit",1)<-15){
			skipevent;
			speech "negative";
		}else{
			if (playergotitem(29)>0) { play "mygun.wav"; }
		}
	}
	on:impact {
		$tmp=impact_class();
		$tmp2=impact_id();
		//+100 Bonus Damage on Flesh
		if (compare_material($tmp,$tmp2,"flesh")==1){
			damage $tmp,$tmp2,100;
		//+100 Bonus Damage on Fruit
		} elseif (compare_material($tmp,$tmp2,"fruit")==1){
			damage $tmp,$tmp2,100;
		//+200 Bonus Damage on Glass
		} elseif (compare_material($tmp,$tmp2,"glass")==1){
			damage $tmp,$tmp2,200;
		}
		freevar $tmp;
		freevar $tmp2;
	}
	on:inhand {
		play "crack1.wav";
	}
	on:noammo {
		speech "negative";
		msg "No ammo!",3;
	}
script=end
1
