Today, i tried checking what will happen if i try to swim in water when on fire. Afterwards, i got myself on fire and jumped straight in water. It seems like you can neither stop the flames nor swim. Character can only do walk animation in water until the flames go out as per the duration written in script.
https://youtu.be/5pf0NQ5WYro
That's completely a SA-MP thingy. I have tried it before, but there maybe is a way to avoid being stuck in this running anim and taking damage? For me sometimes it happens and sometimes the fire goes out.
Also there is no "fire duration" in the script, this is a GTA San Andreas thing when you are caught on fire, sometimes you can receive fire damage without even seeing that you are in your screen.
But I'm still not 100% sure if this can not be fixed, I will see what I can find and also a reply from Mike (since he knows better) should be a quick answer to this.
I don't control what happens in the game.