Garry's Mod

Garry's Mod

TTT Grappling Hook only for Detectives CustomPlayerModel lua-error fix
25 条留言
DeathWalkR die Einhornprinzessin  [作者] 2020 年 3 月 27 日 上午 1:00 
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 2020 年 3 月 26 日 下午 4:47 
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  [作者] 2017 年 12 月 22 日 上午 1:26 
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 2017 年 12 月 21 日 下午 5:20 
oh ok thanks
but can you use it in sand box?
DeathWalkR die Einhornprinzessin  [作者] 2017 年 12 月 20 日 下午 12:40 
--> play TTT
--> become detective
--> buy the weapon in the detective-shop with your detective credits :)
Bio-EngineeredAssaultTurtle 2017 年 12 月 18 日 下午 8:33 
how do you get it?
DeathWalkR die Einhornprinzessin  [作者] 2017 年 2 月 11 日 下午 4:28 
aaaaaaaaaaaaand it's gone. :>

(it was my fault, when porting some other codes)
problem when merging old code with new one
DeathWalkR die Einhornprinzessin  [作者] 2017 年 2 月 11 日 上午 5:15 
Needs some fixing ... It seems like, there are additional errors appearing now, which flood the server-console

any comment can help
[XKR] TuXEKRO 2017 年 1 月 28 日 上午 2:38 
Life goes BBS, no matter what. You have someone waiting, waiting to meet you! Cheer up!
DeathWalkR die Einhornprinzessin  [作者] 2017 年 1 月 27 日 上午 7:07 
as far, as I've seen now, everything should be fixed (including some sound bugs)
DeathWalkR die Einhornprinzessin  [作者] 2017 年 1 月 27 日 上午 4:40 
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 ⭕⃤ 2016 年 8 月 1 日 上午 9:53 
[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 2016 年 5 月 9 日 上午 7:52 
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  [作者] 2016 年 5 月 8 日 下午 3:10 
any additional details?
did you use custom player models?

(I'm short on free time atm)
[XKR] TuXEKRO 2016 年 5 月 7 日 上午 9:28 
[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  [作者] 2016 年 4 月 23 日 上午 4:01 
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 2016 年 4 月 21 日 下午 6:00 
MAKE FOR SANDBOX PLZ
HyperionCaesar 2016 年 2 月 26 日 下午 7:13 
k thx
DeathWalkR die Einhornprinzessin  [作者] 2016 年 2 月 24 日 上午 8:34 
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: http://psteamcommunity.yuanyoumao.com/id/deathwalkr/screenshot/309991266619796954
HyperionCaesar 2016 年 2 月 23 日 下午 5:47 
where in the menu is it?
msn.txt 2015 年 12 月 13 日 上午 10:57 
Okay, its fine
DeathWalkR die Einhornprinzessin  [作者] 2015 年 12 月 13 日 上午 4:46 
"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 2015 年 12 月 12 日 下午 6:26 
Is it possible to change the sound the grapple hook makes?
DeathWalkR die Einhornprinzessin  [作者] 2015 年 5 月 18 日 上午 10:54 
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 2015 年 5 月 18 日 上午 10:35 
Do we need to install both?