how do i make this?
#3

here is a fixed ver

Top:

Код:
new Text:TextDrawScore;

new TextDrawTimer;
new Kills[MAX_PLAYERS];
new Team1Kills, Team2Kills;

static gTeam[MAX_PLAYERS];

forward GetPlayersScores();
in OnGameModeInit():

Код:
TextDrawScore = TextDrawCreate(600.0, 430.0, " ");
TextDrawTimer = SetTimer("GetPlayersScores", 1000, true);
TextDrawLetterSize(TextDrawScore, 0.4, 0.7);
TextDrawUseBox(TextDrawScore, 1);
TextDrawBoxColor(TextDrawScore, 0x0000FFFF);
in OnGameModeExit():

Код:
KillTimer(TextDrawTimer);
in GetPlayerScores():
Код:
for ( new i = 0; i < MAX_PLAYERS; i++ ) {
  for ( new j = 0; j < Kills[i]; j++ ) {
    if ( gTeam[i] == 1 ) {
      Team1Kills++;
    } else if ( gTeam[i] == 2 ) {
      Team2Kills++;
    }
  }
}
new String[50];
format(String, 50, "Team 1 Kills: %d\nTeam 2 Kills: %d", Team1Kills, Team2Kills);
TextDrawHideForAll(TextDrawScore);
TextDrawSetString(String);
TextDrawShowForAll(TextDrawScore);
but yet again, untested
Reply


Messages In This Thread
how do i make this? - by Drift_04 - 05.03.2009, 00:59
Re: how do i make this? - by JaYmE - 05.03.2009, 01:25
Re: how do i make this? - by Daren_Jacobson - 05.03.2009, 01:38
Re: how do i make this? - by JaYmE - 05.03.2009, 01:52
Re: how do i make this? - by Drift_04 - 05.03.2009, 02:47
Re: how do i make this? - by JaYmE - 05.03.2009, 04:41
Re: how do i make this? - by Finn - 05.03.2009, 04:53
Re: how do i make this? - by JaYmE - 05.03.2009, 04:57
Re: how do i make this? - by Finn - 05.03.2009, 11:06
Re: how do i make this? - by Daren_Jacobson - 05.03.2009, 22:57
Re: how do i make this? - by Drift_04 - 06.03.2009, 00:18
Re: how do i make this? - by JaYmE - 06.03.2009, 15:00
Re: how do i make this? - by Drift_04 - 06.03.2009, 22:05
Re: how do i make this? - by Drift_04 - 06.03.2009, 23:56
Re: how do i make this? - by Jefff - 06.03.2009, 23:58
Re: how do i make this? - by Drift_04 - 07.03.2009, 00:16
Re: how do i make this? - by JaYmE - 07.03.2009, 11:09
Re: how do i make this? - by Drift_04 - 08.03.2009, 03:21

Forum Jump:


Users browsing this thread: 1 Guest(s)