Garry's Mod

Garry's Mod

评价数不足
TTT Taser Fix
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 武器
插件标签: 漫画
文件大小
发表于
更新日期
758.000 B
2023 年 12 月 18 日 下午 3:01
2023 年 12 月 19 日 上午 8:41
2 项改动说明 ( 查看 )

订阅以下载
TTT Taser Fix

描述
Fixes that one clientisde error in TTT Taser while on TTT2.

This requires the original TTT Taser file still. It's technically under a restrictive license so I'd prefer not to reupload it.

On line 133 of the TTT Taser cl_init.lua file, it expects a convar ttt_disable_crosshair to exist. Since it doesn't exist, it returns nil on GetConVar, which causes the method :GetBool() to cause a nil error. This creates the convar and has it set to the inverse of ttt_enable_crosshair, so the taser doesn't try to access nil and functionality is preserved.

Thanks to Spanospy for informing me that ttt_enable_crosshair exists.

This code shall be public domain.