1
2
3
4
5
6
7
8
9
addhook("objectdamage","YOURFUNCTIONNAME")
function YOURFUNCTIONNAME(objid,damage,playerid)
	if (playerid>0) then		--Dunno,we can use playerid 0.This way we won't make any errors
		if (player(playerid,"weapontype")==50) then
			parse("damageobject "..objid.." YOURDAMAGE "..playerid)
			return 1		--So we can be sure that the damage is just right
		end
	end
end
Note that in parse cmd spaces are required!
Also note that you'll have to do some changes if you want to add custom damage to one type of building!