Death messages not dissapearing
#1

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;
        }
    }
Reply
#2

because 'num' is always lower than 20 'num > 20' and loop is not working
Reply
#3

so i should do something like

for(new dm = 0; dm < 5; dm++)
{
SendDeathMessageToPlayer(i, 1001, 1001, 200);
}
Reply
#4

yes and change 'i' to 'dm'
Reply
#5

Yeah, but it's ToPlayer so i think that im sending it to players, or that is not how it should go ?
Reply
#6

I'd refer back to where you've got half the code from https://sampforum.blast.hk/showthread.php?tid=508452
Reply
#7

oh yes my bad ;d
Reply
#8

hehe, np, i will test that later, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)