Garry's Mod

Garry's Mod

Pas assez d'évaluations
Nub's Safe Zones
   
Récompenser
Ajouter aux favoris
Favoris
Retirer des favoris
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun
Taille du fichier
Publié le
63.616 KB
20 juil. 2021 à 21h06
1 note de changement ( voir )

S'abonner pour télécharger
Nub's Safe Zones

Dans 1 collection faite par NubTheFatMan
Posted Addons
4 objets
Description
To use this tool, go into Weapons > Other, and you'll find it. When I come around to updating this, I want to move it to the tool menu on the right, and maybe even add buttons to manage zones.

Rewrite of the Safe Zone mod originally published on the gmod store[www.gmodstore.com]
However, this is a rewrite from the ground up and fixes a few issues:
  • The original didn't have any saving. You would have open a specific file and paste Lua code. It was nice enough to generate this lua code, but was an unnecessary step. This also required a server restart. With this mod, you just have to select the tool (found under Weapons > Other), right click to select a zone, click two points, and you were done.
  • This is mostly programmer friendly. You can register your own type, change the behavior of what happens in a zone, or just disallow people as being in the zone (such as a permission system). When an entity (prop or player) enters a zone, it calls certain hooks. This could use some improvements though.
  • This mod factors in the hitbox. The original only factored a props position, which would lead to bugs where a prop was still inside the zone but it's position was not. This means that a large prop could still be used to push players outside of a zone.
  • This mod ghosts any props brought into a zone. The original would delete them without warning.
  • This mod is optimized in which large prop counts won't cause lag. The original scanned every prop in the world every tick, while this limits how many it will scan per tick.

Want to view the source code? You can find it on GitHub[github.com]

Client Console Commands
  • nsz_show_zones (0|1) - Shows a debug of all the current zones and how long it took to scan props during every tick.
  • nsz_show_display (0|1) - Shows or hides the "you are in a zone" indicator located at the top-center of your screen.
  • nsz_delete (zone ID) - Deletes a zone by ID. You can also type "all" to delete every single zone, or a zone's type to delete all zones of that type. SuperAdmin by default, however has ULX support. You can get a zone's ID from the nsz_show_zones command.

Server Console Commands
  • nsz_prop_checks_per_tick (# of props) - How many props should the server calculate per tick. Higher number = more lag, but faster detection.
  • nsz_aabb_v_sat_sensitivity (# sensitivity) - Range of 0 to 90. This is the angle which determines whether to use AABB (Axis Aligned Bounding Box) detection or SAT (Separating Axis Theorem) detection. 0 = always use SAT (slow but accurate), 90 = always use AABB (fast but with false positives).

This mod comes with 3 safe zones by default: Spawn (no building or killing), Safe (no killing), and No Building (obvious what this one does ( ͡° ͜ʖ ͡°)).

It's worth nothing that this addon is not in active development. There are a couple known bugs which are in a linked discussion. I do plan to revisit this and change a few things, but I'm currently working on another mod.

It is also worth noting that this doesn't need to be installed on the client to work. You can use the GitHub link above to download the source files, and just upload them to the server's addon folder. It'll still work just the same!
Discussions populaires Tout voir (2)
0
20 juil. 2021 à 21h57
ÉPINGLÉ : Developer Support
NubTheFatMan
0
20 juil. 2021 à 21h32
ÉPINGLÉ : Bugs
NubTheFatMan
15 commentaires
stevensky 31 aout à 17h36 
great addon, get the github version guys
i3vie 19 mai à 16h10 
Seems to work pretty much fine still, except the update checker thinks that the newest version of the addon is... the content of a 404 page.
Jay 3 nov. 2023 à 22h45 
Edged
NubTheFatMan  [créateur] 30 avr. 2023 à 20h20 
No there isn't. That's an edge case I never thought of. The best I can say is delete all zones and replace the ones you want to keep
#FF69B4 Depression 30 avr. 2023 à 19h24 
if they are out of the world
#FF69B4 Depression 30 avr. 2023 à 19h13 
how do i see the id of a zone
homer simpson 24 mars 2023 à 8h19 
noice
oliverhappleton 9 sept. 2022 à 10h21 
my big question dose it work on nextbots
NubTheFatMan  [créateur] 9 avr. 2022 à 8h35 
Like, once they leave, they can't re-enter the zone (they don't appear in it) until they die? It's something I could do, but I'd have to change up a few things to make it work any good. However, if you do know how to code, there are some hooks you can use in the "Developer Support" discussion to make it work however you like. I'm not actively working on anything for Garry's Mod, and I don't quite have time to make any changes right now.
ohiosigma 9 avr. 2022 à 6h03 
i have 1 single suggestion and that is make an option to not make people invincible if theyve already been in the zone