Skip to content

Area

Designate areas within a map. Players entering an area get a popup with the area name.

Functions

nut.area.getArea (areaID)
nut.area.getArea
Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

get an area's data with its id

Parameters:

integer areaID The area ID of the area

Returns:

table area The requested area

nut.area.getAllArea ()
nut.area.getAllArea
Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

get all areas of the current map

Returns:

table All current areas of the current map

nut.area.addArea (name, vector1, vector2, desc)
nut.area.addArea
Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

add a new area.

Parameters:

string name Name of the area (Will appear in a pop-up upon entering)

Vector vector1 First corner of the area.

Vector vector2 Opposite corner of the area from Vector1

string desc optional. default: "none" Internal description of the area

nut.area.openAreaManager ()
nut.area.openAreaManager

Internal

This is used internally - although you're able to use it you probably shouldn't.

Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

Open the area Manager on the client's screen

Client methods

playerMeta:isInArea (areaID)
playerMeta:isInArea
Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

Check if player is in an area. This is for single check (ex: area items, checking area in commands)

Parameters:

integer areaID The ID of the area to test for

Returns:

bool whether player is in specified area

Or

false

string error message

playerMeta:getArea ()
playerMeta:getArea
Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

Get the client's current Area. This is for continous checks (ex: checking gas area whatever.)

Plugin Hooks

PLUGIN:saveAreas ()
PLUGIN:saveAreas
Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

Save the current area information to disk.

PLUGIN:OnPlayerAreaChanged (client, areaID)
PLUGIN:OnPlayerAreaChanged
Plugin function

This is defined and used within the Area plugin. As such, its functionality might differ in different schemas, or be unavailable.

If area is changed, display the new area's name to the client's screen.

Parameters:

Client client target client entity

integer areaID ID of the new area