Left 4 Dead 2

Left 4 Dead 2

117 个评价
[VScript] Unscope on Shoot (For Bolt Actions)
   
奖励
收藏
已收藏
取消收藏
Game Content: Scripts
Weapons: Sniper
文件大小
发表于
更新日期
10.734 KB
7 月 5 日 上午 4:29
8 月 25 日 下午 4:54
6 项改动说明 ( 查看 )

订阅以下载
[VScript] Unscope on Shoot (For Bolt Actions)

在 ChapCanai 的 1 个合集中
Counter Strikey Weapon Set
49 件物品
描述
Zoom back out after firing the Scout and AWP, to kinda follow counter strike.

You can also toggle/change the delay of re-zooming after shooting

The settings are in \Left 4 Dead 2\left4dead2\ems\unscope_on_shoot_for_bolt_actions

Other scoped weapons are not affected, but you can add/remove them in here too, if you want.

(Only for singleplayer and your local server)

Credits:
VSCode - IDE
marcinbar - VSCode Squirrel Ext
devlos & chatgpt - ParseSettings code
kurochama - Improvements
23 条留言
Valencia 10 月 17 日 上午 7:28 
Mfw NMRiH
AVGyerra 8 月 31 日 上午 9:06 
Works like a charm now!
ChapCanai  [作者] 8 月 25 日 上午 6:57 
@kurochama
Thank you, I can try that way instead of pressing the zoom button for the player to unscope
kurochama 8 月 25 日 上午 6:02 
There's a little hint that might be helpful: NetProps.GetPropInt(player, "m_iFOV") .This netprops is to detect whether a player is using scrope. The value "0" is normal state (unscoped) while value above 0 is scoped state. Normally, you can simply just use "weapon_fire" event function, & then use "if" with the netprops above. For example, you can also write it like this on the "weapon_fire":
//Example for awp
if(player.GetActiveWeapon().GetClassname() == "weapon_sniper_awp")
{
if(NetProps.GetPropInt(player, "m_iFOV") != 0)
{
NetProps.SetPropInt(player, "m_iFOV", 0);
}

}

This will automatically cancel scope after firing. If you want to implement auto scoping after unscoping like that on CS, you can use that netprops on "EntFire", & put it on the "weapon_fire" as well.
ChapCanai  [作者] 8 月 22 日 上午 1:29 
I forgot to ask, does any error appear in the console after shooting while scoped?
ChapCanai  [作者] 8 月 20 日 下午 5:32 
@AVGyerra
It works for me, no idea why doesnt work for some
AVGyerra 8 月 20 日 下午 12:19 
Hmmm, this also doesn't work for me.
Xav1eRRz 8 月 5 日 下午 3:30 
Nice bro 🤝
󠁳 8 月 3 日 上午 1:45 
well this is pretty odd, idk what would be making this script to stop working for me, bad luck ig
ChapCanai  [作者] 8 月 3 日 上午 1:34 
Im testing it right now, working for me