In-game test kit ​
Version 0.1.0 has not been run on a live server yet (see Status). The test kit answers the open questions on your own server: which animations exist on your clients, whether the prone pose and the shots sync, and which shot method works. It needs two clients that can see each other: one shooter (A) and one watcher (B).
Turning it on ​
The commands are only registered when one of these is set:
# server.cfg: a replicated convar, so the clients see it too
setr ccs_testkit 1
or Config.Debug = true in config.lua, which also prints debug lines to F8 (transitions, clip picks, shot results,
method fallback).
Use setr, not set: the clients read the convar. Remove it again before going live. Players could otherwise use the
spikes to play animations and fire scripted bullets. The commands have no permission check.
/ccs_check ​
Prints a report to F8 and the chat. An abbreviated example (names, numbers and durations differ on your server):
---- animations (Config.Anims) ----
crawl move_crawl (onfront_fwd, onfront_bwd, onback_fwd, onback_bwd)
crouchClipset move_ped_crouched (clipset #1)
dive move_jump / dive_start_run (candidate #1, 1.10s)
…
---- pose packs (active: vanilla) ----
vanilla[1] +0° missfbi3_sniping / prone_michael (candidate #1, 4.03s)
---- integrations ----
started: es_extended, np_inventory, np_hud, np_menu
np_inventory isWeaponJammed export: yes
np_inventory reloadWeapon: tried with pcall on each prone reload, own timed reload otherwise
fire method: config auto, session ped
OneSync: asking the server...
OneSync (server convar): on -> ok
| Section | What to look for |
|---|---|
| animations | Every slot resolves (green). MISSING means no candidate loaded: add another candidate in Config.Anims. A candidate number above 1 means the first one is missing on this client |
| pose packs | Every bucket of every pack, with the resolved clip. The active pack needs at least one |
| integrations | The started resources it found, and whether np_inventory has the jam export |
| fire method | session bullet means the auto method already fell back this session |
| OneSync | Must not be off |
Run it on both clients. Animations can differ between game builds and with streamed packs.
Spikes ​
/ccs_spike <name> runs one isolated check. Each prints what to look for on A and what B should see. Any
running deploy is ended first.
| Command | Question | Pass |
|---|---|---|
/ccs_spike engine |
Q1: Does the engine prone aim task (SCRIPTED_GUN_TASK_PLANE_WING) replicate? Run again to stop |
B sees A lying prone and aiming. Informational: the resource doesn't use this task, it is checked in case a newer build fixed it |
/ccs_spike pose |
Q2: Does the active pack's first pose loop and hold the weapon? | Still playing after 1.5 s on A. B, 5 m away, sees a prone shooter holding the rifle (not standing, no T-pose, no floating rifle) |
/ccs_spike shoot |
Q3: Does SetPedShootsAtCoord fire during the pose? Q4: what does B get? |
A: fired, ammo dropped by one, pose survived, impact on the crosshair. B: hears the shot, sees the flash and A still prone, the target takes damage. Aim at an NPC to also test kill credit |
/ccs_spike bullet |
Q5: Does the scripted bullet fallback give correct damage and kill credit? | A: ammo dropped, pose survived. B: hears it, the target takes weapon damage. The flash on B comes from the relay only |
/ccs_spike capsule |
Q6: Does the shrunk capsule fit under low obstacles? Run again to stop | Go prone and crawl under a gate arm or barrier. Pass: the ped passes under it |
/ccs_spike stop |
Ends every running spike |
shoot and bullet need a loaded weapon in hand and start the pose themselves if it isn't playing.
What the answers mean:
- Q3 fails (no shot, or the pose breaks):
Config.Fire.method = 'auto'will fall back tobulletby itself. You can set'bullet'directly. - Q4 fails on B (no sound, no damage) while Q3 passes on A: report it with both clients' F8 output. The relay flash covers the flash, not the sound or the damage.
- Q5 fails: the fallback can't be used on your build. Keep
method = 'ped'and check Q3 again. - Q2 fails: the pose candidates don't work for you. Try the other candidates or a streamed pack.
- Q6 fails: set
Config.Prone.shrinkCapsule = false. Prone players then keep the standing collision height.
Two-client checklist ​
A shoots, B watches. Both have setr ccs_testkit 1 active (restart the resource after setting it). Put a few NPCs or a
third player as targets about 30 m and 150 m away.
- Report.
/ccs_checkon A and on B. All animation slots and the active pose resolve, OneSync is on. - Spikes. On A:
/ccs_spike pose,shoot,bullet,capsule,stop, with B 5 m away. Note PASS or FAIL for Q2 to Q6. Optionallyenginefor Q1. - Crouch. A picks a walk style in np_menu, crouches with
LCONTROL, walks, aims and fires a pistol, stands up. B sees A crouched. A's walk style is back after standing. - Prone and crawl. A goes prone with
Zfrom standing, from crouch, and with a dive at a sprint. Crawls forward and backward, turns, rolls onto the back and back (SPACE).Zreturns to crouch or stand, holdingZstands up. B sees every pose; nothing pops to standing. - Deploy, rifle. A draws an assault rifle, goes prone and holds aim. B sees the prone rifle pose. A turns the aim past 40°: B sees the body turn, A sees Turning until it caught up.
- Fire, rifle. A fires single shots and a burst at a target. B hears the shots, sees the muzzle flash once per shot
(not twice), the target takes damage. Watch the server console for
rejected prone shotlines. - Deploy, sniper. Same with a sniper rifle: scope, zoom, hold breath, one shot per click, a hit at 150 m.
- Blocked muzzle. A lies facing a wall closer than 0.6 m and aims: Muzzle blocked, the trigger only clicks.
- Reload and jams. Empty the clip while deployed: a click and a reload without standing up. With np_inventory,
wear a weapon below its jam threshold and check the jam message and that
Rclears it. - Stance chip. With np_hud, A sees Crouching, Prone, Prone · on back, Prone · deployed. Without np_hud, the built-in pill.
- Exits. While prone: get killed, get cuffed, enter water, get into a vehicle via script. A is standing
afterwards, and B sees the same.
/ccs_spike stopis not needed for these. - Busy UIs. Open the inventory or the phone camera, then press
LCONTROL/Z: refused with a message. While deployed, try to open np_phone: it doesn't open. - Restart.
ensure np_crouch-crawl-shootwhile A is prone: A ends up standing, the camera and UI are gone.
Keep the F8 output of both clients and the server console for anything that fails. Then remove setr ccs_testkit 1.
Offline tests ​
The pure logic has plain Lua tests that run without FiveM:
cd resources/np_crouch-crawl-shoot
lua tests/run.lua
run.lua syntax-checks every Lua file, then runs each tests/test_*.lua in its own process: stance transitions, aim
maths (body follow, pitch buckets, spread, recoil, sway), weapon classes, shot validation, state bag validation, blocks,
locales and utilities. It exits non-zero on a failure. Needs Lua 5.4.