๐Ÿพ [FREE][Standalone] Animal Swim Module โ€“ Realistic Animal Floating in Water!

Make your K9 units and wildlife look natural in water.
This lightweight standalone script lets animal peds (like dogs) swim and float without drowning or ragdolling. Ideal for K9 RP or nature-themed servers!

:wrench: Features

  • :white_check_mark: Detects if player is using an animal ped
  • :sweat_drops: Applies floating logic when in water
  • :heart: Restores health to avoid drowning
  • :man_standing: Disables ragdoll in water (re-enables on land)
  • :brain: Works automatically when player loads in
  • :white_check_mark: Fully client-side, no server performance impact
  • :brick: Supports QBCore but can be made for standalone or ESX with a quick edit

:test_tube: How It Works

When a player joins, the script checks if theyโ€™re using an animal ped (GetPedType(ped) == 28).
If true, it applies gentle upward force while in water, prevents drowning, and disables ragdoll for a clean, natural animal swimming effect.

Code is accessible Yes
Subscription-based No
Lines (approximately) ~180
Requirements QBCore or ESX (optional)
Support Yes
13 Likes

Very cool of you to release this for free!

1 Like

Thank you. Just hoping to start to get my name out there a bit. Have got a lot of ideas to release soon.

2 Likes

a free animal script that stops animal peds from dying when touching water? FINALLY! also YOINK! imma take this on my server

1 Like

Happy to hear more people will get some use out of it hope you enjoy

Awesome! ESX pls !

1 Like

Thank you!

If you go to the readme page it tells you what event to change out you just need to change the qb core player loaded name to the one for esx player loaded.

I will make a push when I get home later and add a option at the top of the client to set qb or esx.

can this be used for standalone (non qb or esx) server?

yes you just need to replace the event at the bottom I am not 100% sure how standalone is you need to have the animal ped skin loaded on the character before calling the script to check so im not sure which of these 2 options will work best test out both options and see which is best for you. If you need any help working on it further my discord is on the readme

AddEventHandler('playerSpawned', function()
    print("^6Debug^7: ^2Loading ^3Animal Swim ^2module^7...")
    Wait(3000)

    if IsPlayerAnimal() then
        HandleAnimalSwim()
    else
        print("^6Debug^7: ^2Player is ^1not ^2animal^7, ^2stopping ^3Animal Swim ^2module^7...")
    end
end)

or

CreateThread(function()
    while not NetworkIsPlayerActive(PlayerId()) do
        Wait(500)
    end

    print("^6Debug^7: ^2Loading ^3Animal Swim ^2module^7...")
    Wait(3000)

    if IsPlayerAnimal() then
        HandleAnimalSwim()
    else
        print("^6Debug^7: ^2Player is ^1not ^2animal^7, ^2stopping ^3Animal Swim ^2module^7...")
    end
end)

1 Like

somehow using husky ped the script is not detecting it as animal ped

Is it just the one ped? If so could be something in the peds meta that it isnโ€™t listed as ped type 28 which are animals it could have another identifier in that place.

Or

if itโ€™s all animals it is a problem with the place that the script is checking for the ped. The player needs to have the ped skin already on there character when they spawn in.

Lastly

If itโ€™s for one person try changing the wait timer longer I noticed with one player when they were on a bad connection the script wouldnโ€™t detect them as a animal in time when they first loaded and they would drown

Hope that helps. Anymore questions discord is in the readme and I can help in more detail there.