pawn Код:
new
bool:PlayerWounded[MAX_PLAYERS char]
;
//(...)
public blood(playerid)
{
new Float:HP;
GetPlayerHealth(playerid,HP);
if(HP <= 20)
{
if (!PlayerWounded{playerid})
{
PlayerWounded{playerid} = true;
GameTextForPlayer(playerid,"~w~You've been criticaly wounded!",2000,6);
SendClientMessage(playerid, COLOR_LIGHTRED, "** Shooting skills set to - low");
SendClientMessage(playerid, COLOR_LIGHTRED, "** Combat skills set to - low");
TextDrawShowForPlayer(playerid,Textdraw5);
}
}
else
{
if (PlayerWounded{playerid})
{
PlayerWounded{playerid} = false;
TextDrawHideForPlayer(playerid,Textdraw5);
}
}
}