Animal Ped Support
isAnimal.lua
This module provides logic to detect if a Ped or model is an animal and classify it into specific categories (cat, dog, coyote, etc.). Useful for wildlife, animal roles, or pet systems.
Alot of this is used to determine what models/animations to use or are available
Global flags:
isCat
,isDog
,isBigDog
,isSmallDog
,isCoyote
,isAnimal
— used to store classification of the player's current ped.
isPedAnimal(ped?)
Checks if a ped is an animal based on predefined animal models.
Sets global isAnimal
to true if matched.
Example:
isCat(ped)
Returns true if the ped model matches a cat.
Example:
isDog(ped)
Returns two values:
true
,true
— if ped is a big dogtrue
,false
— if ped is a small dogfalse
,nil
— if not a dog
Example:
getAnimalModels()
Returns a flat list of all registered animal model hashes.
Example:
getAnimalAnims(ped)
Returns the animation set defined for the given animal model.
Example:
Last updated