Garry's Mod

Garry's Mod

50 ratings
Turret & Emplacement placers
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: NPC
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
25.563 KB
28 Sep, 2019 @ 6:09pm
22 Jun, 2023 @ 1:48am
4 Change Notes ( view )

Subscribe to download
Turret & Emplacement placers

Description
This is a modification of Krrrrrrk's modification of the original TTT Turret by RACHID.

There several reworks and upgrades:

- The turret has whitelist config for TEAMs (would work for TTT or DarkRP or any TEAM-based gamemode)
so if you turn whitelist on in config, then whitelisted TEAMs will be ignored by the turret. For example, in hl2rp you could make so the turret won't attack Civil Protection units!
- Turret and barricade (sent_zar3 by https://gtm.steamproxy.vip/id/zaubermuffin) can be placed and taken back into inventory. There's support of Falco's prop protection so if your gamemode has FPP, then only it's original owner can take it back. Press E on the turret or E on the barricade itself (not AR3 though).
- You can set in config damage scale of the turret
- Both turret & barricade are destroyable, you can set HP in the config
- Only whitelisted or if u use CPPI (FPP has it) then it would be people who placed the turret - only they 'll be able to take it back

Downsides:

- Currently there's no check for changing teams without respawn. Mainly because there are too many hooks for that and sandbox on which I tested this addon doesn't have onplayerchangedteam hook. (FIXED)
- Sometimes preview model doesn't show and you have to switch weapons to restore it
- Whitelist & Dmg scale options will be applied to any npc_turret_floor on the server (may be fixed)
- After taking back the turret you'll have to switch weapons to disable native halflife weapon safer
- Damage scaling only against players, not npcs
- No pics, no clicks (pics & videos updated)

All the bugs above are planned to be fixed, but you'll have to stick with them for a while.

To use the config you'll have to unpack this addon and go to

folder_with_addon\lua\autorun\server\combine_turret_placer_hooks.lua

open that file in the notepad and there you'll see the config. Change variables to what you need, setup whitelist, etc - follow commented instructions.

There are just several lua files. Turret works out-of-box, for the barricade you'll have to add this addon to your collection:
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=104605598 (Original emplacement gun)

Credits:
Original turret: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=233976994
Original modifictation: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=870003338
I'm not sure if I should be proud or ashamed to spend more than two days on this modification, but nonetheless it's been made by Attache for lovely Shpigun ( https://gtm.steamproxy.vip/id/ShpigunForever/ ) from some random hl2rp project. But anyone can use/modify it, of course, since it's workshop and all.
21 Comments
Доктор Коньяк 21 Jun, 2023 @ 6:39am 
Это прекрасно! Спасибо! :p2chell:
Omen 14 Mar, 2021 @ 9:33pm 
Oh cool, I can use this for the engineer class on The Horde Gamemode, ty
>KB> >KEKSQUAD 12 Oct, 2020 @ 2:08am 
Asked the second last one kind of weird whoops
>KB> >KEKSQUAD 12 Oct, 2020 @ 2:07am 
Okay, but I want it to work on both teams. I have this here

/code Shpigun.TeamWL = {
"Combine",
"Rebels"
}
end)
Attache  [author] 11 Oct, 2020 @ 5:19pm 
I don't see how it wouldn't work. Just input one team inside, that should be it
>KB> >KEKSQUAD 11 Oct, 2020 @ 1:36am 
Okay so can I only make it friendly towards one team then?
Attache  [author] 10 Oct, 2020 @ 6:28pm 
I mean that with whitelist turned off it won't work properly
>KB> >KEKSQUAD 7 Oct, 2020 @ 11:38pm 
Did you happen to leave any debug methods behind?
>KB> >KEKSQUAD 7 Oct, 2020 @ 8:05pm 
And I am using the latest version.
>KB> >KEKSQUAD 7 Oct, 2020 @ 6:36pm 
I don't have any prop protection and I was able to kill the enemy with my crowbar, but not the sentry.