Animations Core

Prompt Anim Core

Standalone animation system for gym equipment โ€” used across all Promptโ€™s Mods gym maps.

Installation Instructions

1

Step 1 โ€” Download and install

Download the Prompt Anim Core resource and place it in your resources directory.

resources/prompt_anim_core

Then add it to your server.cfg:

ensure ox_lib
ensure ox_target   # Optional but recommended
ensure prompt_anim_core
2

Step 2 โ€” Configure permissions

Edit your server.cfg to assign ACE permissions:

# Give admin group all gym permissions
add_ace group.admin gym.admin allow

# Add player to admin group
add_principal identifier.steam:YOUR_STEAM_ID group.admin

To disable all permissions and allow everyone to use admin tools:

Config.Permissions.usePermissions = false
3

Step 3 โ€” Start your server

Restart your server and use /placeequipment to begin placing gym props interactively. If animations and interaction zones appear correctly, installation was successful โœ…


๐Ÿ’ก Tip: Keep ox_lib above this resource in your cfg. It provides the required callbacks, menus, and zones for proper animation handling.


Configuration

โš™๏ธ Performance Settings

Config = {
    SpawnDistance = 50.0,  -- Distance props spawn (meters)
    SyncRadius = 20.0,     -- Animation sync radius
    Debug = true,          -- Enable debug logs
}

๐Ÿ’ก Lower SyncRadius = better performance on high-pop servers.


Admin Commands

/placeequipment

Place gym equipment anywhere with an in-game editor.

Controls:

  • WASD โ€” Move horizontally

  • PgUp/PgDn โ€” Adjust height

  • Q/E โ€” Rotate

  • G โ€” Snap to ground

  • ENTER โ€” Save placement

  • BACKSPACE โ€” Cancel

Requires gym.place or gym.admin permission (unless disabled)

How it works:

  1. Opens selection menu

  2. Displays transparent preview

  3. Move/rotate freely

  4. Press ENTER to save โ€” instantly syncs for all players


Developer API

exports['prompt_anim_core']:SpawnGymEquipment(
    equipmentType,  -- "speedbag", "leg_press", etc.
    coords,         -- vector3(x, y, z)
    heading,        -- 0.0โ€“360.0
    locationName,   -- optional (e.g. "custom_gym")
    instanceName    -- optional unique ID
)

Example:

exports['prompt_anim_core']:SpawnGymEquipment(
    "speedbag",
    vector3(100.0, 200.0, 30.0),
    90.0,
    "custom_location",
    "my_speedbag_1"
)

Exercise Tracking API

Hook into these events for progression or stats systems.

gym:exerciseStarted

AddEventHandler('gym:exerciseStarted', function(data)
    print(data.playerName .. " started using " .. data.machineType)
end)

gym:exerciseCompleted

AddEventHandler('gym:exerciseCompleted', function(data)
    print(data.playerName .. " completed " .. data.machineType)
    print("Duration: " .. data.duration .. " seconds")
end)

Data Example:

{
    playerId = 1,
    playerName = "John Doe",
    machineName = "vinewood_default_speedbag_1",
    machineType = "speedbag",
    animationDict = "prompt@speedbag",
    animationName = "speedbag@skel_clip_0",
    position = vector3(x, y, z),
    heading = 90.0,
    location = "vinewood",
    timestamp = 1699123456,
    duration = 15
}

User-Placed Props System (not sure yet)

Props placed via /placeequipment are stored in GlobalState, visible to all players.

Persistence Type
Description

โœ… Session-based

Props persist during active session

โŒ No DB save

Lost on server restart

๐Ÿงฉ Future update will include optional database persistence.

Lifecycle:

  1. Admin places โ†’ Saved in GlobalState.gym_user_placed_props

  2. New player joins โ†’ Client loads & spawns all

  3. Admin removes โ†’ Instantly removed from world


Interaction Systems

Two supported systems, auto-detected at runtime:

System
Description

ox_target

Preferred. Circular interaction zones with โ€œUse Equipmentโ€ prompts.

lib.zones

Fallback. TextUI prompts when nearby (press E).

If ox_target is not installed, the script automatically switches to lib.zones.


Debug Mode

Config.Debug = true

Displays:

  • Spawn/despawn logs

  • Animation triggers

  • Player position/heading

  • Permission checks

  • Exercise data

Disable in production for best performance.


Dependencies

Required:

  • ox_lib

Optional:

  • ox_target (recommended for enhanced targeting)


Quick Start

  1. Install and ensure ox_lib (and optionally ox_target)

  2. Add ensure prompt_anim_core to server.cfg

  3. Configure permissions (or disable them)

  4. Use /placeequipment to start placing gym props

  5. Players interact via target zones or proximity prompts


Example: Custom Gym Resource

RegisterCommand('spawngym', function()
    exports['prompt_anim_core']:SpawnGymEquipment("speedbag", vector3(100,200,30), 0.0, "custom", "bag1")
    exports['prompt_anim_core']:SpawnGymEquipment("leg_press", vector3(105,200,30), 90.0, "custom", "press1")
    exports['prompt_anim_core']:SpawnGymEquipment("gymbike", vector3(110,200,30), 180.0, "custom", "bike1")
end)

AddEventHandler('gym:exerciseCompleted', function(data)
    print(data.playerName .. " earned XP for " .. data.machineType)
end)

Troubleshooting & Support

Problem
Solution

Props not visible

Ensure ox_lib is running and resource is started

Can't use /placeequipment

Check ACE permissions or disable them in config

Animations not syncing

Increase SyncRadius or ensure players are within range

Props floating/clipping

Use G to snap to ground, adjust with PgUp/PgDn

Join Discord

Last updated