This export calculate if the player is inside a protected zone.
-- coords must be a vector3 object about the coordenates to checkexports['p6_zones']:IsProtectedZone(coords)
Output: boolean, vector3, vector4
boolean (true/false) that indicates if the player is inside a protected zone.
vector3 contains the safe zone for the specified coords.
vector4 contains the safe zone coordinates and radius specified in the config file for this protected zone.
IsPveZone
This export calculate if the player is inside a PvE zone.
-- coords must be a vector3 object about the coordenates to checkexports['p6_zones']:IsPveZone(coords)
Output: boolean, vector4
boolean (true/false) that indicates if the player is inside a PvE zone.
vector4 contains the PvE zone coordinates and radius specified in the config file for this PvE zone.
IsPvPZone
This export calculate if the player is inside a PVP zone.
Output: boolean, vector4
boolean (true/false) that indicates if the player is inside a PvP zone.
vector4 contains the PvP zone coordinates and radius specified in the config file for this PvP zone.
IsSafeZone
This export calculate if the player is inside a safe zone.
Output: boolean, vector4
boolean (true/false) that indicates if the player is inside a safe zone.
vector4 contains the safe zone coordinates and radius specified in the config file for this safe zone.
SafeAllowNeeds
This export indicates if the zone in the specified coords allows the player to use the bathroom. Can be used with the mod "P6 Additional Needs".
Output: boolean
boolean (true/false) that indicates if the zone in that coords allows.
SafeAllowEmote
This export indicates if the zone in the specified coords allows the player to perform the specified emote. It is necessary to configure the emotes script. Check the Installation section.
Output: boolean
boolean (true/false) that indicates if the zone in that coords allows the specified emote.
-- coords must be a vector3 object about the coordenates to check
exports['p6_zones']:IsPvPZone(coords)
-- coords must be a vector3 object about the coordenates to check
exports['p6_zones']:IsSafeZone(coords)
-- coords must be a vector3 object about the coordenates to check
exports['p6_zones']:SafeAllowNeeds(coords)
-- coords must be a vector3 object about the coordenates to check
exports['p6_zones']:SafeAllowEmote(coords, emoteName)
local isProtected, greenCoords, redZone = exports['p6_zones']:IsProtectedZone(coords)
if isProtected then
print("The zone is: " .. redZone.x .. redZone.y .. redZone.z)
end