06.06.2011, 19:22
First include this.
Then add anywhere in your script:
If that doesn't work, try putting this in OnPlayerUpdate (or a timer):
Simple, ain't it?
EDIT: By the way, it doesn't work while you're in a car.
Then add anywhere in your script:
pawn Код:
public OnPlayerStartSwimming( playerid ) {
SetPlayerHealth( playerid, 0.0 );
return 1;
}
pawn Код:
public OnPlayerUpdate( playerid ) {
if( IsPlayerSwimming( playerid ) ) {
SetPlayerHealth( playerid, 0.0 );
}
return 1;
}
EDIT: By the way, it doesn't work while you're in a car.