SA-MP Forums Archive
ColAndreas IsPlayerInWater problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ColAndreas IsPlayerInWater problem (/showthread.php?tid=663304)



ColAndreas IsPlayerInWater problem - Wajttachu - 27.01.2019

I'm experiencing annoying problem w/ ColAndreas...
I'm using .dll from releases page and working .inc (no warnings/errors) from master page...
So this is the problem, even tho player is like 1.0 above from water (Standing on object above water) it shows up he is in water...
HTML Code:
if(CA_IsPlayerInWater(playerid, -1.0, -1.0))
	{
		Server(playerid, "U vodi si!");
	}
if(CA_IsPlayerInWater(playerid, 0.0, 0.0))
	{
		Server(playerid, "U vodi si!");
	}

if(CA_IsPlayerInWater(playerid, 0.0, 0.0))
	{
		Server(playerid, "U vodi si!");
	}
Result was always same, here is photo:
https://imgur.com/a/oaiXj5H


Re: ColAndreas IsPlayerInWater problem - Hunud - 27.01.2019

Checks if the animation/s applies when in water


Re: ColAndreas IsPlayerInWater problem - Wajttachu - 27.01.2019

Quote:
Originally Posted by Hunud
View Post
Checks if the animation/s applies when in water
I want to do it w/ colandreas
Also i need IsPlayerNearWater which is almost same checks as this for one job i'm doing ...


Re: ColAndreas IsPlayerInWater problem - Bolex_ - 27.01.2019

This might help you as well, https://github.com/Jelly23/IsPlayerTouchingWater


Re: ColAndreas IsPlayerInWater problem - SymonClash - 27.01.2019

pawn Code:
IsPlayerUsingSwimAnim(playerid)
{
    switch(GetPlayerAnimationIndex(playerid))
    {
        case 1538, 1542, 1540, 1544, 1250, 1062, 1539: return true;
    }
    return false;
}
pawn Code:
if(IsPlayerUsingSwimAnim(playerid))
{
    SendClientMessage(playerid, -1, "You're in water!");
}
else
{
    SendClientMessage(playerid, -1, "You aren't in water!");
}