JixelPatterns
  • JixelPatterns Documentation
  • Troubleshooting
    • Common Issues
    • Setting Up Locations
    • FAQ
  • Dependency
    • Jim_Bridge
      • Animal Ped Support
      • Script Helpers
      • Loader Functions
      • Callbacks
      • Cameras
      • Context Menus
      • Crafting
      • DrawText
      • Dui Functions
      • Input Creator
      • Inventories
      • Job Functions
      • Make Functions
      • Meta Handlers
      • Notifications
      • Phones
      • Player Functions
      • Poly Zones
      • Progress Bars
      • Scale Entity
      • Shops
      • Skillcheck
      • Society Banking
      • Stash Control
      • Targets
      • Vehicles
      • Wrapper Functions
      • Scaleforms
  • Paid Assets
    • Jim-Mechanic
      • Common Issues
      • Installation
      • Locations
        • Creating a Location
      • Nitrous
      • Harness + Seatbelt
      • Emergency Repair Bench
      • Odometer
      • Speedometer
      • Performance Mods
      • Preview System
      • Repair System
      • Car Lifts
      • Plate Change
      • Push Vehicle
      • Stancer Kit
      • Vehicle Seat Picker
    • Jim-Bakery
      • Installation
    • Jim-BeanMachine
      • Installation
    • Jim-BurgerShot
      • Installation
    • Jim-CatCafe
      • Installation
    • Jim-Henhouse
      • Installation
    • Jim-PizzaThis
      • Installation
    • Jim-Popsdiner
      • Installation
  • Free Assets
    • Jim-Mining
      • Installation
      • How To Use
        • Mining
        • Stone Washing
        • Gold Panning
    • Jim-Recycle
      • Installation
      • How To Use
        • Recycling
        • Dumpster Diving
        • Scrapping
    • Jim-Payments
      • Installation
      • How To Use
    • Jim-Shops
      • Installation
      • How To Use
    • Jim-Boarding
      • Installation
      • How To Use
    • Jim-Trains
      • Installation
      • How To Use
    • Jim-Consumbles
      • Installation
      • How To Use
    • Jim-DJBooth
      • Installation
      • How To Use
    • Jim-JobGarage
      • Installation
      • How To Use
    • Jim-Chairs
      • Installation
    • Jim-Notepad
      • Installation
      • How To Use
Powered by GitBook
On this page
  • isAnimal.lua
  • isPedAnimal(ped?)
  • isCat(ped)
  • isDog(ped)
  • getAnimalModels()
  • getAnimalAnims(ped)
  1. Dependency
  2. Jim_Bridge

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.

At player load in, it automaticallyattempts to get what kind of ped/animal you are but there are functions to double check in scripts

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:

local isPlayerAnimal = isPedAnimal()
local isOtherPedAnimal = isPedAnimal(GetPedInVehicleSeat(vehicle, -1))

isCat(ped)

Returns true if the ped model matches a cat.

Example:

if isCat() then print("You're a cat!") end

isDog(ped)

Returns two values:

  • true, true — if ped is a big dog

  • true, false — if ped is a small dog

  • false, nil — if not a dog

Example:

local isDog, isBig = isDog()
if isDog then print(isBig and "Big Dog" or "Small Dog") end

getAnimalModels()

Returns a flat list of all registered animal model hashes.

Can be used to check ped models against

Example:

for _, model in pairs(getAnimalModels()) do print(model) end

getAnimalAnims(ped)

Returns the animation set defined for the given animal model.

Example:

local anims = getAnimalAnims(PlayerPedId())
if anims then playAnim(anims.sitDict, anims.sitAnim) end

PreviousJim_BridgeNextScript Helpers

Last updated 1 day ago