#1

How can i make that when somebody is in the water, he die automatic?
Reply
#2

edit - What thefatshizms said ^^
Reply
#3

Or you could just do this:

pawn Код:
stock IsPlayerInWater(playerid)
{
        new anim = GetPlayerAnimationIndex(playerid);
        if (((anim >=  1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
        return 0;
}

public OnPlayerUpdate(playerid)
{
       if(IsPlayerInWater(playerid)
       {
            SetPlayerHealth(playerid, 0);
       }
       return 1;
}
Reply
#4

then i have 1 error: error 001: expected token: ")", but found "{"

Quote:

if(IsPlayerInWater(playerid)
{

on the {
Reply
#5

Sorry that's my fault use this:
if(IsPlayerInWater(playerid))
{
Reply
#6

Works, thx. ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)