[HELP]Player In Water ?
#1

Hi , all in the Subject , how to check if the player is in the water ?

I don't need includes doing that , if it is possible with SA-MP Package Only , i'm glad to know how to done it , else , you can give me the include ..

Thanks !!
Reply
#2

You can check his animation
Reply
#3

hmm.. you mean the animation once player jump in the water? do you know its name please?
Reply
#4

pawn Код:
stock IsPlayerInWater(playerid)
{
    new lib[16], anim[32];
    GetAnimationName(GetPlayerAnimationIndex(playerid), lib, sizeof(lib), anim, sizeof(anim));
    if(!strcmp(lib, "SWIM", true) && !isnull(lib)) return 1;
    return 0;
}
Surprisingly simple. Get isnull in y_utils (part of YSI): https://sampforum.blast.hk/showthread.php?pid=1696956#pid1696956
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)