Animations Core 2.0

Animations Core 2.0

Prompt Anim Core


Overview

Prompt Anim Core is a standalone gym equipment system for FiveM that provides:

  • Location-based gym management (spawn equipment by location)

  • Multiple equipment types with synchronized animations

  • Clear Location feature (hide vanilla objects inside a radius)

  • Optional boxing ring support

  • Admin placement tool: /placeequipment

  • Developer exports for spawning/removing equipment and managing locations

  • Client-server synchronization + resource-based cleanup


Installation Instructions

1

Step 1 โ€” Install dependencies

Ensure these resources are installed:

  • ox_lib (required)

  • ox_target (optional, recommended)

2

Step 2 โ€” Install Prompt Anim Core

Place the resource folder in your resources directory:

resources/prompt_anim_core_prompt_gym_fornewscriptonly
3

Step 3 โ€” Start order (server.cfg)

Add this to your server.cfg (keep the order):

ensure ox_lib
ensure ox_target   # Optional but recommended
ensure prompt_anim_core_2_new
4

Step 4 โ€” Restart & test

Restart your server and run:

  • /gymcreator

If you can place equipment and interact with it (target or TextUI), installation was successful โœ…

Join Discord


๐Ÿ’ก Tip: Keep ox_lib above this resource in your cfg. It provides menus, callbacks, notifications, and fallback zones used by the system.


Additional Information

Configuration

โš™๏ธ Performance Settings (config.lua)

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.


๐Ÿ” Permissions System (config.lua)

Config.Permissions = {
    usePermissions = true,        -- Set false to disable ACE checks
    placeEquipment = "gym.place", -- Permission for /placeequipment
    deleteEquipment = "gym.delete",
    admin = "gym.admin"           -- Grants all permissions
}

ACE example (server.cfg):

# 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:

Config.Permissions.usePermissions = false

๐Ÿ—จ๏ธ UI Text (config.lua)

Config.Messages = {
    open = "Start Exercise",
    close = "Stop Exercise",
    menuTitle = "Gym Equipment Menu"
}

๐Ÿ‹๏ธ Equipment Types

Available equipment types:

  • bench (supports extended bar placement)

  • vin_chu

  • leg_press

  • speedbag

  • gymbike

  • gymlatpull

  • gympullmachine1

  • gympullmachine2

  • gymrowpull

  • gymspeedbag

โœ… Safe to edit: labels, UI text, zone sizes ๐Ÿšซ Donโ€™t edit unless you know what youโ€™re doing: model names, animation dicts/names


/gymcreator (Admin Placement Tool)

Place gym equipment anywhere in the world using an in-game editor.

Requirements

gym.place or gym.admin permission (or set usePermissions = false)

How it works

  1. Opens a menu to select equipment type

  2. Spawns a transparent preview (only you see it)

  3. Move/rotate to position

  4. Press ENTER to save (broadcasts to all players)


Location System (config/config_c.lua)

Locations are defined in config/config_c.lua under the locations table:

locations = {
    ['location_name'] = {
        coords = vec3(x, y, z),           -- Required: center point
        renderDistance = 100.0,           -- Optional override

        clearLocation = {                 -- Optional: hide vanilla objects
            radius = 20.0,
            additionalObjects = {
                "prop_custom_model_1",
                "prop_custom_model_2"
            }
        },

        props = {                         -- Equipment to spawn
            speedbag = {
                vec4(x, y, z, heading),
                vec4(x, y, z, heading)
            },
            leg_press = {
                vec4(x, y, z, heading)
            },
            bench = {
                -- Simple format: bar attaches to player
                vec4(x, y, z, heading),

                -- Extended format: bar spawns at fixed position
                { coords = vec4(x, y, z, h), bar = vec4(x, y, z, h) }
            }
        }
    }
}

Clear Location Feature

The clearLocation feature hides default/vanilla objects (like vanilla gym props) when players enter your custom gym area.

clearLocation = {
    radius = 20.0,
    additionalObjects = {
        "your_custom_model",
        "another_model"
    }
}

How it works:

  1. When a player enters the location, the system scans objects within the radius

  2. Matches against global clearLocationModels + per-location additionalObjects

  3. Hides matching objects while inside

  4. Restores objects when leaving (and on script restart)


Boxing Ring (Optional)

boxingRing = {
    enable = true,
    model = "vision_gymboxingring",
    coords = {
        vec4(x, y, z, heading),
        vec4(x, y, z, heading)
    }
}

Developer API (Exports)

Location Management

exports['prompt_anim_core']:CreateGymLocation(locationName, data)
exports['prompt_anim_core']:RemoveGymLocation(locationName)

Equipment Management

exports['prompt_anim_core']:AddEquipmentToLocation(locationName, equipmentType, coords)
exports['prompt_anim_core']:RemoveEquipmentFromLocation(locationName, equipmentType, coords, tolerance)

Instance-based Spawn / Despawn

exports['prompt_anim_core']:SpawnGymEquipment(equipmentType, coords, heading, locationName, instanceName)
exports['prompt_anim_core']:DespawnGymEquipment(instanceName)

Utility Functions

exports['prompt_anim_core']:GetLocationEquipment(locationName)
exports['prompt_anim_core']:GetAllLocations()
exports['prompt_anim_core']:GetAvailableEquipmentTypes()

exports['prompt_anim_core']:GetEquipmentTypes()
exports['prompt_anim_core']:IsEquipmentBusy(instanceName)
exports['prompt_anim_core']:GetSpawnedEquipment()

Exercise Tracking API

Hook into these events for progression, stats, achievements, etc.

gym:exerciseStarted

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

gym:exerciseCompleted

AddEventHandler('gym:exerciseCompleted', function(data)
    print(("%s completed %s in %d seconds"):format(data.playerName, data.machineType, data.duration))
end)

Interaction Systems

Two supported systems, auto-detected:

System
Description

ox_target

Preferred. Target zones with โ€œUse Equipmentโ€ prompts

lib.zones

Fallback. TextUI prompts when nearby (press E)


Debug Mode

Config.Debug = true

Disable in production for best performance.


Troubleshooting

Problem
Solution

Props not visible

Ensure ox_lib is running and the resource is started

Can't use /gymcreator

Check ACE permissions or disable permissions 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

Vanilla objects clipping

Configure clearLocation radius + additionalObjects

Join Discord

Last updated