But my trig is very very weak (I cannot visualizes the angles/numbers in my mind the same way I can in geometry)
and I am not sure about one part of the script.
I think that
set Posz to ( Posz - ( player.getpos z * MyScale ) )
is not the right way to compensate for the players scale. But I am not sure how else to do it.
I do not need this kind of adjustment for the zombies as they will always be the same scale.
Scriptname aadpHeadShotRef targetFloat PoszFloat angxRef raceFloat Myscalebegin gamemode;;;This is for testing onlyset target to GetCrosshairRefif target != 0 if IsFormValid target != 1 set target to 0 elseif target.getdisabled == 1 || target.getdead == 1 || target.isactor == 0 set target to 0 endifendifif target != 0 set Posz to target.getpos z set race to player.getrace set Myscale to getracescale race set Posz to ( Posz - ( player.getpos z * MyScale ) ) set Posz to Posz + 95 set angx to player.getangle x set angx to angx * -1 set angx to ( ( tan angx ) * ( player.getdistance Target ) ) set angx to angx + 110 message"angle %.2f"angx if angx < ( Posz + 20 ) && angx >= Posz messagebox"headshot" endifendifend