Garry's Mod

Garry's Mod

121 ratings
Sentry Gun
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Entity
Addon Tags: Fun, Roleplay, Realism
File Size
Posted
Updated
820.141 KB
14 Oct @ 4:43pm
16 Oct @ 7:45am
3 Change Notes ( view )

Subscribe to download
Sentry Gun

Description
NSentry Gun
An advanced automated sentry gun entity with intelligent targeting, whitelist management, and dynamic combat states. Features smooth animations and a comprehensive GUI interface for access control.

Core Features
The sentry gun features intelligent target tracking with line-of-sight verification and multiple operational states including Watching, Searching, and Engaging modes. A dynamic laser sight provides visual feedback with color-coded states: green indicates watching mode, yellow shows searching behavior, and red signals active engagement. The sentry includes animated barrel rotation that responds to firing state and realistic idle scanning behavior with randomized patrol patterns. The unit is destructible with a health system and will automatically target both players and NPCs within a configurable radius.

Whitelist System
The owner is automatically whitelisted upon placement and can manage access through an intuitive GUI interface. Players can be added or removed from the whitelist, and entire entity classes can be whitelisted to prevent friendly fire incidents. The whitelist menu is accessible only to the owner and provides real-time management of authorized users. Visual and audio feedback confirms all whitelist changes. Players can hold the USE key for 1.5 seconds to add or remove themselves from the whitelist, while double-clicking USE when the sentry is powered off opens the full whitelist management menu.

Controls
A single press of the USE key toggles the sentry between on and off states.
Holding USE for 1.5 seconds allows players to add or remove themselves from the whitelist.
When the sentry is powered off, double-clicking USE opens the whitelist management menu for the owner.

Spawning
Find "Sentry Gun" in the spawn menu under the Tactical RP category.

Configuration
All parameters are adjustable in the code, including health and durability settings, targeting radius, fire rate and damage values, turn speed and aim tracking precision, idle scan patterns and timing, as well as search behavior and timeout durations.

Requirements
Call of Duty Black Ops 6 Sentry (Prop) (for sentry.mdl model)

Credits
  • Model: Call of Duty: Black Ops 6 Sentry- ported by Stefano
  • Code: Intel
  • Inspired by tactical shooters and military sims



Perfect for: Tactical RP, MilitaryRP, DarkRP, base defense scenarios, or any gamemode requiring automated perimeter security with access control.
22 Comments
ToMIsla Tom 25 Oct @ 11:02am 
In an attempt to change the turret settings in the files, the mod simply breaks and does not work. Can you add settings via console commands? The mod is really cool, but I would like to customize :P
GAMLET 23 Oct @ 11:43am 
[Styled's CS:GO Weapons] lua/autorun/sh_csgo_weapons.lua:76: attempt to call method 'GetActiveWeapon' (a nil value)
1. hookfunc - lua/autorun/sh_csgo_weapons.lua:76
2. fn - addons/perfopus_performance_metrics_111/lua/perfopus/sh_time_hook.lua:36
3. unknown - lua/ulib/shared/hook.lua:115
4. FireBullets - [C]:-1
5. method - lua/entities/nsentry/init.lua:555
6. FireWeapon - addons/perfopus_performance_metrics_111/lua/perfopus/sh_time_entity.lua:25
7. method - lua/entities/nsentry/init.lua:402
8. HandleFiring - addons/perfopus_performance_metrics_111/lua/perfopus/sh_time_entity.lua:25
9. method - lua/entities/nsentry/init.lua:208
10. unknown - addons/perfopus_performance_metrics_111/lua/perfopus/sh_time_entity.lua:25 (
Froze 22 Oct @ 7:31am 
@Intel
that's crazy...very much looking forward to that...hope it goes well! :steamthumbsup:
Boozer33 22 Oct @ 4:32am 
Buildin a sentry
Celestia•天星☆ 22 Oct @ 1:01am 
for some reason the turret fires at the walls when theres no enemy in half life 2 maps
Intel  [author] 21 Oct @ 7:44am 
@Froze Actually I am working on it, but this gonna take some time
Celestia•天星☆ 21 Oct @ 5:40am 
@Intel i see thanks but still its pretty inconvenient when u need to type in more then one npc names
Froze 21 Oct @ 1:58am 
this is a very, very weird question but what do you think of recreating the wheelson from MW2?
any realistic chance of that happening?
Intel  [author] 20 Oct @ 12:49am 
@-NokoAndKoshi-
You can hide the sentry's tripod by toggling its bodygroup. Then use the physgun to flip it upside down and attach it to the ceiling.

I'd suggest using the Advanced Movement tool or Advanced Duplicator to do this, since they'll give you a much cleaner attachment.
-NokoAndKoshi- 19 Oct @ 6:35pm 
how did you get it on the ceiling and where is the code to edit it?