Death messages not dissapearing -
ShoortyFl - 25.04.2016
I don't know what is the problem, death messages are not dissapearing when i want them to, code:
Showing up:
foreach(Player, i)
{
if(PlayerInWar[i] == 1)
{
SendDeathMessageToPlayer(i, killerid, playerid, reason);
}
}
and it's ok, it does show them, but it doesn't hide them
pawn Код:
foreach(Player, i)
{
if(PlayerInWar[i] == 1)
{
TextDrawHideForPlayer(i, WarTD0[i]);
TextDrawHideForPlayer(i, WarTD1[i]);
TextDrawHideForPlayer(i, WarTD2[i]);
TextDrawHideForPlayer(i, WarTD3[i]);
for ( new num; num > 20; num++ )
{
SendDeathMessageToPlayer(i, 1001, 1001, 200);
}
PlayerInWar[i] = 0;
}
}
Re: Death messages not dissapearing -
Jefff - 26.04.2016
because 'num' is always lower than 20 'num > 20' and loop is not working
Re: Death messages not dissapearing -
ShoortyFl - 26.04.2016
so i should do something like
for(new dm = 0; dm < 5; dm++)
{
SendDeathMessageToPlayer(i, 1001, 1001, 200);
}
Re: Death messages not dissapearing -
Jefff - 26.04.2016
yes and change 'i' to 'dm'
Re: Death messages not dissapearing -
ShoortyFl - 26.04.2016
Yeah, but it's ToPlayer so i think that im sending it to players, or that is not how it should go ?
Re: Death messages not dissapearing -
Sew_Sumi - 26.04.2016
I'd refer back to where you've got half the code from
https://sampforum.blast.hk/showthread.php?tid=508452
Re: Death messages not dissapearing -
Jefff - 26.04.2016
oh yes my bad ;d
Re: Death messages not dissapearing -
ShoortyFl - 26.04.2016
hehe, np, i will test that later, thanks