It's for the shieldhit hook
Scripts
How to check if a player is scoping
How to check if a player is scoping
1

hit it would be possible to check for scoping by checking the amount of damage. This isn't a 100% accurate solution in all cases though (damage can be reduced by previous hits).
shieldhit doesn't even provide a damage value it's not even possible to use a damage based workaround there
DC: I decided to use item(wpn_id, 'dmg').
* 0.5.
player(p, 'weaponmode').
attack2 if I am not wrong.
Masea: Yeah it's possible to follow the weapon mode for every player in a variable.
Mami Tomoe. Thought about adding the very same thing. Will do so. player1zoom = 0
addhook("attack2","_attack2")
function _attack2(id,mode)
	if mode==1 then
		player1zoom = 1
	elseif mode==2 then
		player1zoom = 2
	end
end
addhook("shieldhit","_shieldhit")
function _shieldhit(id,source)
	if player1zoom == 1 then
		msg("ah is one")
	elseif player1zoom == 2 then
		msg("oh is two")
	end
end
addhook("select","_select")
function _select(id)
	player1zoom = 0
end
mrc: I know right, but as I said I just made an idea for 3 minutes. Just tired after job and less attentive. Fixed post, thanks anyways.
1
