https://github.com/re-sync-dev/ZoneManager
Simple, easy to use Zone management module.
https://github.com/re-sync-dev/ZoneManager
Last synced: 3 months ago
JSON representation
Simple, easy to use Zone management module.
- Host: GitHub
- URL: https://github.com/re-sync-dev/ZoneManager
- Owner: Vyon
- License: apache-2.0
- Created: 2022-03-15T21:47:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-15T21:54:04.000Z (over 4 years ago)
- Last Synced: 2025-01-01T05:32:24.649Z (over 1 year ago)
- Language: Lua
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zone Manager
Simple, easy to use Zone management module.
## Documentation
#### CreateNewZone( self, Position, Size, Visualize, ... ):
Creates a new zone and sets the position and size to the ones provided.
The first argument in ... is the tag override so if you want to create custom tags,
that's the way to go.
@params: (self: Dictionary, Position: Vector3, Size: Vector3, Visualize: boolean, ...: any)
@ret: (Zone: Dictionary, Tag: string)
#### CheckZone( self, ZoneName ):
Uses GetPartBoundsInBox to check if any parts belonging to a player is within the zone.
This is essentially the core of the ZoneManager module.
@params: (self: Dictionary, ZoneName: string)
@ret: nil
#### GetAllPlayersInZone( self, ZoneName ):
Self explanatory
@params: (self: Dictionary, ZoneName: string)
@ret: Array
#### Start( self ):
Creates a new thread the constantly loops through the _Zones table and calls check zone with the zone name.
All of this happens on a new thread to prevent the main thread from yielding.
@params: (self: Dictionary)
@ret: nil
#### StopAllZones( self ):
Turns the property IsActive from true to false if IsActive is already true.
@params: (self: Dictionary)
@ret: nil
#### CleanUpZone( self, ZoneName ):
Removes the zone from the _Zones table
@params: (self: Dictionary, ZoneName: string)
@ret: nil