SA-MP Forums Archive
Death messages not dissapearing - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Death messages not dissapearing (/showthread.php?tid=605870)



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