A full-featured pet system for FiveM. Players buy pets from an NPC shop with an in-game ped preview, call them out from a persistent database, and interact via ox_target. Pets have real stats (hunger, loyalty, stamina), doghouse placement with rest regen, fetch/frisbee play, carry mode, and full edge-case handling (death, respawn, water rescue, under-map recovery).Documentation Index
Fetch the complete documentation index at: https://docs.apex-services.site/llms.txt
Use this file to discover all available pages before exploring further.
Features
- Pet Shop NPC with blip, proximity prompt, pause-menu ped preview + variation cycling
- Persistent database (
apex_petsauto-created via oxmysql) - My Pets UI — call, dismiss, sit/stay/lay down/beg/paw/bark/enter car
- Stats — hunger decay, loyalty gain on petting, stamina affects follow speed
- Doghouse item — place, rest regen, ox_target interactions, pick up
- Play items — tennisball (fetch), frisbee (longer throw), petfood (feeding)
- Pet redeem items — configurable items that grant specific pet models
- Carry mode — attach anim, drop with
X - Edge cases handled — death, respawn, water rescue, under-map recovery
- Anti-cheat — server-side price validation, rate limiting, model whitelist, input sanitization
Requirements
Required
es_extended, ox_lib, oxmysqlOptional
ox_target — for interactions (disable via Config.UseTarget = false)Configuration
config.lua
HOME opens My Pets, X drops a carried pet, E opens the shop. /givepet <model> <name> is available when Debug = true.
Hooks
See Hooks reference / Pet System. Key hooks:Hooks.OnPurchaseSuccess, Hooks.IsPlayerDead, Hooks.OnAntiCheatViolation.
Resource info
Code accessible:
config.lua, hooks.lua, locales/*, html/*. Approximately 3000 lines of Lua + NUI. English + German.