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:
/placeequipmentDeveloper exports for spawning/removing equipment and managing locations
Client-server synchronization + resource-based cleanup
Installation Instructions
๐ก 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.adminTo 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_chuleg_pressspeedbaggymbikegymlatpullgympullmachine1gympullmachine2gymrowpullgymspeedbag
โ 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)
/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
Opens a menu to select equipment type
Spawns a transparent preview (only you see it)
Move/rotate to position
Press ENTER to save (broadcasts to all players)
Location System (config/config_c.lua)
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:
When a player enters the location, the system scans objects within the radius
Matches against global
clearLocationModels+ per-locationadditionalObjectsHides matching objects while inside
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:
ox_target
Preferred. Target zones with โUse Equipmentโ prompts
lib.zones
Fallback. TextUI prompts when nearby (press E)
Debug Mode
Config.Debug = trueDisable in production for best performance.
Troubleshooting
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
Last updated