Garry's Mod
คะแนนไม่เพียงพอ
TTT Taser Fix
   
รางวัล
ชื่นชอบ
ชื่นชอบแล้ว
เลิกชื่นชอบ
Content Type: Addon
Addon Type: Weapon
Addon Tags: Comic
ขนาดไฟล์
โพสต์
อัปเดต
758.000 B
18 ธ.ค. 2023 @ 3: 01pm
19 ธ.ค. 2023 @ 8: 41am
2 หมายเหตุการเปลี่ยนแปลง ( ดู )
คำอธิบาย
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.