Hi All,
I've created a basic binocular script (just the note script to be fair) but would like to zoom when RMB is pressed, much the same as the sniper rifle. I cannot workout from the weapons.lua where this function exists, is it hard coded or is this something I can achieve with lua?
Edit: Video link removed
binoculars_readingnote = 0
function binoculars_init(e)
LoadImages("binoculars",0)
end
function binoculars_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 120 and g_PlayerHealth > 0 then
Prompt("E to Use Binoculars")
if g_KeyPressE == 1 then
binoculars_readingnote = 1
end
if binoculars_readingnote==1 then
SetImagePosition(50,50)
ShowImage(0)
else
HideImage(0)
end
else
binoculars_readingnote=0
HideImage(0)
end
--SetImageAlignment (0)
--HideImage(1)
end
Processor: Intel Core i5-7400
Memory: 16GB DDR4 2133MHz
Graphics Card: NVIDIA GeForce GTX 1060 6GB