Installation — ns-animpos
-
Put the
ns-animposfolder into your resources (e.g.resources/[nullsect]/ns-animpos). -
OneSync must be enabled (the server reads the ped position, heading, speed and vehicle itself).
-
Start it after your framework and ox_lib (and after scully_emotemenu if you use it). Add to
server.cfg:ensure ns-animpos add_ace group.admin ns-animpos.admin allow -
Restart the server. There is no database and no SQL to import.
Verify
| Check | Expected |
|---|---|
| Server console | [ns-animpos:SV] [INFO] ready (framework=qbox, poses=54, core=…) |
Play any emote from any menu, then /animpos | three arrows appear on your character, the HUD shows the keys |
| Drag an arrow towards a wall | your character moves and stops at the wall |
/animpos list | the pose picker opens on the right, ESC closes it |
| Pick a pose | a see-through ghost appears with three arrows |
Drag an arrow, press R, drag the blue ring | the ghost moves, then turns |
| Move the ghost behind a wall or a closed door | the ring under it turns red, Enter is refused |
| Enter on a free spot | your character moves into the pose; a second player sees it |
Press X or W | you stand up where you started |
| While posing, play another emote, then cancel it | the position stays during the emote; after cancelling you are back at the start |
/animpos while posing | the ghost appears at the pose for adjusting |
| In a vehicle / while cuffed | /animpos is refused |
restart ns-animpos while posing | you are back at the start, not frozen |
Emote menu
Any emote menu works through live mode: play the emote, then /animpos. The gizmo moves your character in that
animation. Nothing has to be configured.
With scully_emotemenu started, /animpos while a scully emote is playing uses ghost mode instead
(Config.EmoteMenu = 'auto'): you preview the emote on a ghost before your character moves. Scenarios
(smoking, guitar, ...) are not detected and go to live mode. Config.EmoteMenu = 'none' always uses live mode.
Blocked zones
Add places where animpos must not be used at all (bank vaults, police cells, evidence rooms):
-
Stand in the middle of the place and type
/animposzones(admin). Your position is printed in F8 asvector3(...). -
Add a line to
Config.BlockedZones:{ label = 'Pacific vault', coords = vector3(254.0, 225.5, 101.9), radius = 8.0 }, -
Restart the resource and type
/animposzonesagain: the zones are drawn as red spheres. Type it once more to hide them.
For other scripts
| Side | Export / data | Use |
|---|---|---|
| client | exports['ns-animpos']:IsPosing() / IsPlacing() | is the player in a pose / placing one |
| client | exports['ns-animpos']:Open(id?) / Stop() | open the picker (or a pose), leave the pose |
| server | exports['ns-animpos']:IsPosing(src) | is the player posing |
| server | exports['ns-animpos']:ForceEnd(src) | end the pose (the player stays where they are), e.g. when cuffing |
| both | Player(src).state.ns_animpos | true while posing (written by the server only) |
Police / medical scripts: cuffing, dying, ragdolling or attaching the ped already end the pose without moving it.
Troubleshooting
No framework adapter is active→Config.Frameworknames a framework that is not started.- Every spot is red with "Something is in the way" → you are standing inside a prop or wall; step away first.
Config.Checks.lineOfSight = falsedisables the wall check (not recommended). - "The ghost is in another room or building" in a big MLO → that MLO uses several interiors;
set
Config.Checks.sameInterior = false. - An emote from the menu is not picked up → it must be a looped animation emote (not a scenario), and
Config.EmoteMenumust not be'none'.