Skip to content

Debug & np_admin ​

/colshapes ​

Who What it does
Server console (colshapes) Prints the server stats and the first 50 server shapes (id, type, owner, dimension, entities inside)
Allowed player (/colshapes) Toggles the client overlay: green outlines of the client shapes within debugDrawDistance (150 m), plus a list of the nearest ones (id, type, owner, entities inside)
Allowed player (/colshapes server) Also sends a one-time snapshot of the server shapes near the player (within debugServerRadius, 300 m, in the player's routing bucket, at most debugMaxServerShapes). They are drawn in blue. Run it again to refresh
[np_colshape] server: 42 shapes, 7 entities inside, 31 cells (+1 wide) | fast 0.41 ms / 118 | slow 0.12 ms / 64 | enters 913 exits 906 errors 0
  #1 sphere owner=np_fuel dimension=0 inside=0
  #2 polygon owner=np_gangs dimension=0 inside=3
  • Players need the permission node np_colshape.debug. A player without it gets no answer.
  • Each use by a player is written to the np_admin log (toggled colshape overlay or colshape overlay with server shapes).
  • Outlines are drawn for the shapes of every resource, client side only. To draw just your own shapes from code, use npColshape.debug.
  • On GTAV Enhanced np_colshape is idle and /colshapes is not registered.

Stats ​

exports.np_colshape:getStats() returns the same numbers on either side. See Natives & events → np_colshape exports.

lua
local s = exports.np_colshape:getStats()
print(s.shapes, s.inside, s.fast.ms, s.errors)

Turn on debug in the config (or in np_admin) to print rejected shapes, export errors and the shapes removed when their owner stops.

np_admin ​

bridge/np_admin.lua is a byte-identical copy of np_admin/lib/np_admin.lua. np_admin stays optional, and no ACE is used.

Permission np_colshape.debug (Colshape debug, category np_colshape), registered with npAdmin.permissions. Gates /colshapes
Without np_admin The lib allows the console, identifiers in the convar np_admin_fallback and ESX groups in np_admin_fallback_groups (default admin,superadmin)
Settings Config.Colshape is editable in np_admin's Resource settings (Colshapes), every field live. See Configuration → Editable in np_admin
Log Every player use of /colshapes
cfg
# without np_admin: allow players by identifier, comma separated
set np_admin_fallback "license:abc…,discord:123…"