#5

pawn Код:
stock IsPlayerInWater(playerid)
{
    new animlib[32],tmp[32];
    GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,tmp,32);
    if(!strcmp(animlib, "SWIM") && !IsPlayerInAnyVehicle(playerid) ) return true;
    return false;
}
And put this on player update:

pawn Код:
if(IsPlayerInWater(playerid))
        {
            SetPlayerHealth(playerid,0.0);
        }
Reply


Messages In This Thread
MAp - by Loinal - 24.08.2016, 22:48
Re: MAp - by M8 - 24.08.2016, 23:53
Re: MAp - by Crayder - 25.08.2016, 01:23
Re: MAp - by Threshold - 25.08.2016, 04:06
Re: MAp - by TomRedlake - 25.08.2016, 08:47

Forum Jump:


Users browsing this thread: 2 Guest(s)