[Really Need Help With This]Textdraw Team Kill Counter
#1

Hi!

I making this for a friend. How can i make a textdraw with a team kill counter?

I have done this:

pawn Код:
new groves[MAX_PLAYERS];
pawn Код:
new ballas[MAX_PLAYERS];
What would i put under OnPlayerDeath?

The result should be at the bottom-left cornor saying:

Groves have: 10 kills
Ballas have: 12 kills



Reply
#2

Thnx so much dude!
Reply
#3

Seems a bit unnecessary to me. You're using a timer where one isn't needed.

pawn Код:
new GroveScore,BallasScore;
public OnGameModeInit()
{
  TextDrawStuffz...
}
public OnPlayerDeath(playerid,killerid,reason)
{
  if(gTeam[playerid]==grove)
  {
    if(gTeam[playerid]==grove)GroveScore--; //otherwise punishment
    else BallasScore++;
  }else{
    if(gTeam[playerid]==ballas)BallasScore--; //otherwise punishment
    else GroveScore++;
  }
  new tmpstr[50]; //Accommodate for string size
  format(tmpstr,sizeof(tmpstr),"Grove: %d  Ballas:%d",GroveScore,BallasScore);
  TextDrawSetString(YourTextDraw,tmpstr);
  return 1;
}
Simpler and doesn't require timers
Reply
#4

Thn x both u guys! It really helped my friend!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)