Sniper Scripting Help
#8
[cubescript]default_scopefov = 50
scopefov_increment = 10

validfov = [ bool = 0; if (&& (> $arg1 4) (< $arg1 61)) [ bool = 1 ]; result $bool ]

doscope = [
if (! $numargs) [
scopefov $default_scopefov
setscope 1
onrelease [ setscope 0 ]
] [
if (strcmp $arg1 "+") [
newfov = (- $scopefov $scopefov_increment)
if (validfov $newfov) [ scopefov $newfov ]
]
if (strcmp $arg1 "-") [
newfov = (+ $scopefov $scopefov_increment)
if (validfov $newfov) [ scopefov $newfov ]
]
]
]

altaction_5 = doscope
delta_game_0 = [ if (= (curweapon) 5) [ if (= $arg1 1) [ doscope + ] [ doscope - ] ] [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ] ][/cubescript]

Heres how I'd do it. Scrolling the mouse wheel while scoped will zoom in/out.

If you really want a version that just zooms in when you press F8, just do:

[cubescript]bind F8 [ doscope + ][/cubescript]
Thanks given by:


Messages In This Thread
Sniper Scripting Help - by CDan75 - 18 Aug 12, 06:20PM
RE: Sniper Scripting Help - by MykeGregory - 18 Aug 12, 07:49PM
RE: Sniper Scripting Help - by CDan75 - 18 Aug 12, 11:27PM
RE: Sniper Scripting Help - by Bukz - 18 Aug 12, 11:29PM
RE: Sniper Scripting Help - by Skipslikeapansy - 19 Aug 12, 07:40AM
RE: Sniper Scripting Help - by Felix-The-Ghost - 20 Aug 12, 07:59PM
RE: Sniper Scripting Help - by Jg99 - 22 Aug 12, 05:08AM
RE: Sniper Scripting Help - by Bukz - 23 Aug 12, 10:31AM
RE: Sniper Scripting Help - by CDan75 - 26 Aug 12, 11:17PM