29.12.2012, 16:45
Quote:
if(IsPlayerInWater(playerid)) return SetPlayerHealth(playerid,0.0); |
if(IsPlayerInWater(playerid)) return SetPlayerHealth(playerid,0.0); |
new bool:is_message_Sent[ MAX_PLAYERS ];
public OnPlayerUpdate( playerid ) {
if(IsPlayerInWater(playerid)) {
SetPlayerHealth(playerid,0.0);
if( is_message_Sent[ playerid ] == false ) {
SendClientMessage( playerid, 0xFFFFFFFF, "You died." );
is_message_Sent[ playerid ] = true;
return true;
}
}
}
public OnPlayerSpawn( playerid ) {
is_message_Sent[ playerid ] = false;
return true;
}
if(IsPlayerInWater(playerid)) return SetPlayerHealth(playerid,0.0); format(str,144,"«| %s Has Jumped Into Infected Water And Died. |»",PlayerName[playerid]); SendClientMessageToAll(COLOR_CYAN,str);
if(IsPlayerInWater(playerid) && GetPlayerHealth(playerid) > 0.0) { SetPlayerHealth(playerid, 0.0); format(str,144,"«| %s Has Jumped Into Infected Water And Died. |»",PlayerName[playerid]); SendClientMessageToAll(COLOR_CYAN, str); }
if(IsPlayerInWater(playerid)) { SetPlayerHealth(playerid, 0.0); format(str,144,"«| %s Has Jumped Into Infected Water And Died.|»",PlayerName[playerid]); SendClientMessageToAll(COLOR_CYAN, str);