Textdraw problem.
#1

I have made textdraw, which shows player Kills, Deaths, Level, EXP. Here is code:

pawn Код:
OnGameModeInt()

format(tstring, sizeof(tstring), "[Kills: %d]");
  Textdraw0 = TextDrawCreate(13.000000,435.000000, tstring);
  format(tstring, sizeof(tstring), "[Deaths: %d]");
  Textdraw1 = TextDrawCreate(137.000000,435.000000, tstring);
  format(tstring, sizeof(tstring), "[Level: %d]");
  Textdraw2 = TextDrawCreate(294.000000,435.000000, tstring);
  format(tstring, sizeof(tstring), "[EXP: %d]");
  Textdraw3 = TextDrawCreate(416.000000,435.000000, tstring);
  TextDrawUseBox(Textdraw0,1);
  TextDrawBoxColor(Textdraw0,0x000000ff);
  TextDrawTextSize(Textdraw0,629.000000,-3.000000);
  TextDrawAlignment(Textdraw0,0);
  TextDrawAlignment(Textdraw1,0);
  TextDrawAlignment(Textdraw2,0);
  TextDrawAlignment(Textdraw3,0);
  TextDrawBackgroundColor(Textdraw0,0x000000ff);
  TextDrawBackgroundColor(Textdraw1,0x000000ff);
  TextDrawBackgroundColor(Textdraw2,0x000000ff);
  TextDrawBackgroundColor(Textdraw3,0x000000ff);
  TextDrawFont(Textdraw0,1);
  TextDrawLetterSize(Textdraw0,0.499999,1.100000);
  TextDrawFont(Textdraw1,1);
  TextDrawLetterSize(Textdraw1,0.499999,1.100000);
  TextDrawFont(Textdraw2,1);
  TextDrawLetterSize(Textdraw2,0.499999,1.100000);
  TextDrawFont(Textdraw3,1);
  TextDrawLetterSize(Textdraw3,0.499999,1.100000);
  TextDrawColor(Textdraw0,0x00ff0099);
  TextDrawColor(Textdraw1,0xff0000cc);
  TextDrawColor(Textdraw2,0xffff0099);
  TextDrawColor(Textdraw3,0xffffffff);
  TextDrawSetOutline(Textdraw1,1);
  TextDrawSetOutline(Textdraw2,1);
  TextDrawSetOutline(Textdraw3,1);
  TextDrawSetProportional(Textdraw0,1);
  TextDrawSetProportional(Textdraw1,1);
  TextDrawSetProportional(Textdraw2,1);
  TextDrawSetProportional(Textdraw3,1);
  TextDrawSetShadow(Textdraw1,1);
  TextDrawSetShadow(Textdraw2,1);
  TextDrawSetShadow(Textdraw3,1);


//A timer which updates in 2 seconds

public TextDrawUpdate()
{
  for(new i; i<MAX_PLAYERS; i++)
    {
    format(tstring, sizeof(tstring), "[Kills: %d]", Kills[i]);
    TextDrawSetString(Textdraw0, tstring);
    format(tstring, sizeof(tstring), "[Deaths: %d]", Deaths[i]);
    TextDrawSetString(Textdraw1, tstring);
    format(tstring, sizeof(tstring), "[Level: %d]", Level[i]);
    TextDrawSetString(Textdraw2, tstring);
    format(tstring, sizeof(tstring), "[EXP: %d]", EXP[i]);
    TextDrawSetString(Textdraw3, tstring);
  }
}
But all I can see is Kills: 0, Deaths: 0..... But my kills, or deaths are for example 5 and 1. When i check it with stats command, it shows me my Kills, Deaths, but textdraw shows only 0.
Reply


Messages In This Thread
Textdraw problem. - by arnutisz - 08.07.2009, 18:25
Re: Textdraw problem. - by refshal - 08.07.2009, 18:34
Re: Textdraw problem. - by arnutisz - 08.07.2009, 19:37
Re: Textdraw problem. - by Jefff - 08.07.2009, 19:40
Re: Textdraw problem. - by arnutisz - 09.07.2009, 17:02
Re: Textdraw problem. - by gytisx - 09.07.2009, 17:42
Re: Textdraw problem. - by arnutisz - 09.07.2009, 17:50
Re: Textdraw problem. - by gytisx - 09.07.2009, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)