Garry's Mod

Garry's Mod

TTT Grappling Hook only for Detectives CustomPlayerModel lua-error fix
25 Comments
DeathWalkR die Einhornprinzessin  [author] 27 Mar, 2020 @ 1:00am 
you would need to rewrite some parts of it

to at least remove it from the detective shop
(unpack the mod and place the folders in your local gmod/addons directory - as well on the server)

go to entities/weapons/grapplehook/shared.lua
line 63: SWEP.CanBuy = { ROLE_DETECTIVE } // remove the role (so that the brackets are empty), then it should not be buyable in the credit shop - neither by detective, nor by Ts

if it should be buyable in a different shop (outside the ttt "vanilla" components), it then depends, how that kind of shop does access custom weapons (or how custom weapons need to be written)


(I haven't touched any lua code vor 2 years now but I hope, this helps a bit)
[NEKO] Myzumi | SYD 26 Mar, 2020 @ 4:47pm 
any way to remove it from the credits shop? like to have it in a other shop where you can buy it with "coins"
DeathWalkR die Einhornprinzessin  [author] 22 Dec, 2017 @ 1:26am 
sadly no, otherwise the Name here would be "Sandbox Grappling Hook" or just "Grappling Hook" instead of "TTT Grappling Hook"
I just copied the addon and uploaded a bugfixed version it (see description -> original file) ... or besides that, you can find Sandbox-capable grappling hooks as well, if you use the search-box on the workshop startpage
Bio-EngineeredAssaultTurtle 21 Dec, 2017 @ 5:20pm 
oh ok thanks
but can you use it in sand box?
DeathWalkR die Einhornprinzessin  [author] 20 Dec, 2017 @ 12:40pm 
--> play TTT
--> become detective
--> buy the weapon in the detective-shop with your detective credits :)
Bio-EngineeredAssaultTurtle 18 Dec, 2017 @ 8:33pm 
how do you get it?
DeathWalkR die Einhornprinzessin  [author] 11 Feb, 2017 @ 4:28pm 
aaaaaaaaaaaaand it's gone. :>

(it was my fault, when porting some other codes)
problem when merging old code with new one
DeathWalkR die Einhornprinzessin  [author] 11 Feb, 2017 @ 5:15am 
Needs some fixing ... It seems like, there are additional errors appearing now, which flood the server-console

any comment can help
[XKR] TuXEKRO 28 Jan, 2017 @ 2:38am 
Life goes BBS, no matter what. You have someone waiting, waiting to meet you! Cheer up!
DeathWalkR die Einhornprinzessin  [author] 27 Jan, 2017 @ 7:07am 
as far, as I've seen now, everything should be fixed (including some sound bugs)
DeathWalkR die Einhornprinzessin  [author] 27 Jan, 2017 @ 4:40am 
My girlfriend broke up with me (after 8 years of relationship) ... so now after a few Months of depression, I am now actively doing several bugfixes again

please keep testing :-)
(sorry, that I didn't put a note inhere ... she's been my 1st GF, big love, etc... she left me for another dude, to play Borderlands / Borderlands 2 with him ... )
Rainer Winkler ⭕⃤ 1 Aug, 2016 @ 9:53am 
[GrapplingHookfordetectivesonlycustommodelfix] gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:231: Tried to use a NULL entity!
1. Remove - [C]:-1
2. EndAttack - gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:231
3. unknown - gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:257
[XKR] TuXEKRO 9 May, 2016 @ 7:52am 
Yes, I use custom player models.

Like this helps you:
https://garrysmods.org/download/18573/grappling-hook-v34-fixed

Unmindful that version uses the addon has fixed it, but there in theory is the latest version.

PS: Many thanks for making it compatible with the TTT: 'D <3
DeathWalkR die Einhornprinzessin  [author] 8 May, 2016 @ 3:10pm 
any additional details?
did you use custom player models?

(I'm short on free time atm)
[XKR] TuXEKRO 7 May, 2016 @ 9:28am 
[ERROR] gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:170: attempt to index a nil value
1. UpdateAttack - gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:170
2. unknown - gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:83


[ERROR] gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:225: Tried to use a NULL entity!
1. Remove - [C]:-1
2. EndAttack - gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:225
3. unknown - gamemodes/terrortown/entities/weapons/grapplehook/shared.lua:87

This is when I try to use the grappling hook someone else.
DeathWalkR die Einhornprinzessin  [author] 23 Apr, 2016 @ 4:01am 
In Workshop are many grappling hooks available, which allready do work in sandbox.

If you don't have a TTT-Server with custom playermodels, you don't need this version.

This one is just a copy of another existing TTT-version, with a simple bugfix to work with pony-playermodels on TTT Servers without spamming the console.
ThePianoMan 21 Apr, 2016 @ 6:00pm 
MAKE FOR SANDBOX PLZ
HyperionCaesar 26 Feb, 2016 @ 7:13pm 
k thx
DeathWalkR die Einhornprinzessin  [author] 24 Feb, 2016 @ 8:34am 
since this is a detective-only-weapon, it's only available in the buy-menu of the detective
it can be found by the icon

see: https://steamhost.cn/steamcommunity_com/id/deathwalkr/screenshot/309991266619796954
HyperionCaesar 23 Feb, 2016 @ 5:47pm 
where in the menu is it?
msn.txt 13 Dec, 2015 @ 10:57am 
Okay, its fine
DeathWalkR die Einhornprinzessin  [author] 13 Dec, 2015 @ 4:46am 
"no" -> there (sadly) is no config-file, in which you could change the sound
"yes" -> you could unpack the code-file and edit it: the used sounds are defined in line 42-44

local sndPowerUp = Sound("weapons/crossbow/hit1.wav")
local sndPowerDown = Sound("Airboat.FireGunRevDown")
local sndTooFar = Sound("buttons/button10.wav")

// i am not that good at lua yet, that i could add such functionality - i am as good, that i can fix some script-error-messages
msn.txt 12 Dec, 2015 @ 6:26pm 
Is it possible to change the sound the grapple hook makes?
DeathWalkR die Einhornprinzessin  [author] 18 May, 2015 @ 10:54am 
you only need one addon

use the linked addon (original file), if your server uses default player models
or use this one, if your server uses custom player models
Blåhaj 18 May, 2015 @ 10:35am 
Do we need to install both?