Coloque no topo do GM:
Coloque no OnGamemodeInit
pawn Код:
//HitMarker
HitMark = TextDrawCreate(333.000000, 174.000000, "X");
TextDrawBackgroundColor(HitMark, 255);
TextDrawFont(HitMark, 1);
TextDrawLetterSize(HitMark, 0.500000, 1.000000);
TextDrawColor(HitMark, -1);
TextDrawSetOutline(HitMark, 0);
TextDrawSetProportional(HitMark, 1);
TextDrawSetShadow(HitMark, 1);
SetTimer("CheckHitMark", 500, true);//0,5s
Coloque dentro da funзгo OnPlayerGiveDamage
pawn Код:
SetPVarInt(playerid, "HitMark", 1);
TextDrawHideForPlayer(playerid, HitMark);
TextDrawShowForPlayer(playerid, HitMark);
Coloque em algum canto do gamemode
pawn Код:
forward CheckHitMark();
public CheckHitMark()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(GetPVarInt(i, "HitMark") > 0)
{
SetPVarInt(i, "HitMark", GetPVarInt(i, "HitMark")-1);
if(GetPVarInt(i, "HitMark") == 0)
{
TextDrawHideForPlayer(i,HitMark);
}
}
}
return 1;
}