CityRP Documentation Repository

cityrp.zones

Zoning library.

Functions

Sharedcityrp.zones.inbox(target, pos1, pos2) → booleanSource ☍

Checks if a target vector is within a box.

Parameters

  • targetVectorThe target vector.
  • pos1VectorThe first corner of the box.
  • pos2VectorThe opposite corner.

Returns

  1. booleanWhether the target is in the box.
Sharedcityrp.zones.lowhigh(vec1, vec2) → number, numberSource ☍

Orders two numbers from low to high.

Parameters

  • vec1numberThe first number.
  • vec2numberThe second number.

Returns

  1. 1numberThe lower number.
  2. 2numberThe higher number.
Sharedcityrp.zones.vectotable(vec) → number[]Source ☍

Converts a vector into a table of its x, y, z components.

Parameters

  • vecVectorThe vector to convert.

Returns

  1. number[]The vector's components as a 3-entry array.

Tables

Sharedcityrp.zonesSource ☍

Zoning library.