SA-MP Forums Archive
help! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help! (/showthread.php?tid=114884)



help! - jaksimaksi - 21.12.2009

Hi i'm making clan wars mod, i need to create that when players will be in lobby, kill list dont showing deaths/kills and when base starting kill list is showing. can someone can say how to do it?


Re: help! - M4S7ERMIND - 21.12.2009

I got curious, ran some tests and this is what I made:

This will hide kill/death list for all players as long as your server is not full.
Add this where you want it to get hidden.
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
  if(!IsPlayerConnected(i))
  {
    for(new j; j < 5; j++)
    {
      SendDeathMessage(i, i, 1);
    }
    break;
  }
}
Edit: replace
Код:
for(new i; i < MAX_PLAYERS; i++)
to
Код:
for(new i = MAX_PLAYERS-1; i >= 0; i--)



Re: help! - LarzI - 21.12.2009

pawn Код:
SendDeathMessage(i, i, 1);
should be

pawn Код:
SendDeathMessage(i, j, 1);
?


Re: help! - M4S7ERMIND - 21.12.2009

Quote:
Originally Posted by lrZ^ aka LarzI
pawn Код:
SendDeathMessage(i, i, 1);
should be

pawn Код:
SendDeathMessage(i, j, 1);
?
Nope, it should be SendDeathMessage(i, i, 1);
Non-connected player kills himself, it will send empty deathmessage


Re: help! - LarzI - 21.12.2009

Oh, ok :P
My bad...
But what is the second for loop good for?
You don't use 'j' anywhere...


Re: help! - M4S7ERMIND - 21.12.2009

it could as well be

Код:
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
SendDeathMessage(i, i, 1);
the other loop sends deathmessage 5 times


Re: help! - LarzI - 21.12.2009

oh, lol. my bad x)))