0
Awards
LV
0
 
41
Likes
171

Messages

tweky

BOSS DE BOSS
Staff member
Administrator
Moderator LCS
High Rollers
Joined
Jun 7, 2024
Reaction score
41
Points
28
Age
31
Website
minios.ro
Credits
2,667

🔫 Sentry Guns Plugin​


⭐ Automated Defense System for CS 1.6




📌


🛡️ This plugin allows players to build automated sentry guns that defend areas automatically.
🎯 Sentries detect enemies, rotate, fire lasers, and explode when destroyed.
🤖 Fully compatible with bots and optimized for War3FT servers.




✨


✅ Build sentry guns in-game
✅ Automatic enemy detection & firing
✅ Cool blue-green laser effect
✅ Random glow colors
✅ Idle left-right rotation (pendulum)
✅ Manual destroy command
✅ Bots can build sentries
✅ Optimized & stable (no lag)




🎮


💰 Cost: $50 per sentry
🧱 Max per player: 2
❤️ Health: 300 HP
💥 Damage: 15 / shot
📡 Range: 1000 units
⏱️ Fire rate: 0.5 sec
🌍 Global limit: 64 sentries




⌨️


bind KEY sentry_build // Build a sentry
say /sentry // Show help
say /destroysentry // Destroy your sentries
say_team /sentry
say_team /destroysentry




🖱️


🧍 Player must be alive
⬇️ Player must be on ground
💵 Must have at least $50
🎮 Press the bound key


• Sentry auto-detects enemies
Fires laser when target is found
• Changes glow color randomly
• Destroyed if owner dies
• All sentries removed on new round




🎨


🌈 Sentries use 10 random glow colors:


Red, Green, Blue, Yellow, Magenta,
Cyan, Orange, Purple, White, Gray


🎲 Color changes:
• On firing
• When hit
• On idle rotation
• When owner touches it




🤖


🤖 Bots can automatically build sentries
Code:
• Cooldown: ~200 seconds

• Chance: 10%

• Checks:





Alive
Less than 2 sentries
Valid position




🔊

Code:
sglcs/turrset.wav     - Build sound

sglcs/turridle.wav   - Destroy sound

sglcs/turrspot.wav   - Target found

weapons/m249-1.wav   - Fire

weapons/m249-2.wav   - Fire




📁

Code:
addons/amxmodx/plugins/lcs_sentryguns_news.amxx



models/sglcs/

platform.mdl
t_grd3_fine.mdl
ct_grd3.mdl
sound/sglcs/

turrset.wav
turridle.wav
turrspot.wav
sprites/

laserbeam.spr
steam1.spr


⚙️


#define MAXPLAYERSENTRIES 2
#define SENTRY_DAMAGE 15
#define SENTRY_HEALTH 300.0
#define BUILD_COST 50
#define SENTRY_RANGE 1000.0
#define THINK_FREQUENCY 0.5
#define MAXSENTRIES 64




📦


amxmodx
engine
fun
cstrike
fakemeta




✅

Code:
v2.0



Fixed kill attribution
Better glow system
Bot improvements
Performance optimizations


v1.0

Initial release




🎯


🔥 Perfect for War3FT / Public / Fun servers / Zombie
⚖️ Balanced gameplay
🎨 Cool visuals
⚡ Optimized & stable

PASSWORD :
Code:
www.lastcs.ro


de_train32_frw0000.pngde_train32_frw0001.pngde_train32_frw0002.pngde_train32_frw0004.png
de_dust2_20090002.pngde_dust2_20090000.png



Video GamePlay:



 

Attachments

Last edited:
UPDATE !!

After approximately one month of running the plugin on the server, several bugs appeared. These issues have now been resolved in this version.

Error encountered:

[ENGINE] Invalid entity 50 Run time error 10: native error (entity_get_vector)

Fixes implemented:

  • ✅ Added validity checks before using any entity:

    Code:
    if (ent <= 0 || !is_valid_ent(ent)) return

  • 📍 Changed the operation order in <span>sentry_detonate</span> to save the position before deleting the entity.
  • 🧹 Separated base destruction so it executes only after clearing all references.
  • 🛡️ Added extra validation checks in all functions that may receive invalid entities.
  • 🏷️ Updated plugin version to "2.1-fixed" to clearly distinguish the corrected build.
Result:
The plugin should no longer generate "Invalid entity" errors.



RO!

După aproximativ o lună de funcționare a pluginului pe server, au apărut câteva buguri. Aceste probleme au fost rezolvate în această versiune.

Eroare întâlnită:

Code:
[ENGINE] Invalid entity 50 Run time error 10: native error (entity_get_vector)


Corecții implementate:

  • ✅ Am adăugat verificări de validitate înainte de utilizarea oricărei entități:

    Code:
    if (ent &lt;= 0 || !is_valid_ent(ent)) return
  • 📍 Am modificat ordinea operațiilor în <span>sentry_detonate</span> pentru a salva poziția înainte ca entitatea să fie ștearsă.
  • 🧹 Am separat distrugerea bazei astfel încât să se execute doar după curățarea tuturor referințelor.
  • 🛡️ Am adăugat verificări suplimentare în toate funcțiile care pot primi entități invalide.
  • 🏷️ Am actualizat versiunea pluginului la "2.1-fixed" pentru a diferenția clar varianta corectată.
Rezultat:
Pluginul nu ar mai trebui să genereze erori de tip "Invalid entity".
 

Attachments

shape1
shape2
shape3
shape4
shape5
shape6
Back
Top