Textdraw help..
#1

Hey I made this textdraw. It should update every second but it doesn't even show..
pawn Код:
forward UpdateText();
new Text:Result;

OnGameModeInit
SetTimer("UpdateText", 1000, true);

public UpdateText()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
      {
     new string[256];
       Result = TextDrawCreate(3,436," ");
       format(string,sizeof(string),"Blue~w~Team: ~g~%d ~w~vs ~y~Yellow~w~Team: ~g~:d - by Tomaz",Points[0],Points[1]);
       TextDrawSetString(Result,string);
     TextDrawAlignment(Result,0);
       TextDrawFont(Result,0);
       TextDrawLetterSize(Result,0.4,1);
       TextDrawSetOutline(Result,1);
     TextDrawSetProportional(Result,1);
       TextDrawSetShadow(Result,1);
       TextDrawUseBox(Result, 1);
       TextDrawBoxColor(Result,0x00000089);
     TextDrawShowForPlayer(i, Result);

            } else { TextDrawDestroy(Result); }
        }
    return true;
}
Reply
#2

Bump
Reply
#3

There must be 200 players on your server for textdraw to be shown, otherwise it gets destroyed..

pawn Код:
public UpdateText()
{
  new string[128];
  Result = TextDrawCreate(3, 436," ");
  format(string,sizeof(string),"Blue~w~Team: ~g~%d ~w~vs ~y~Yellow~w~Team: ~g~:d - by Tomaz",Points[0],Points[1]);
  TextDrawSetString(Result,string);
  TextDrawAlignment(Result,0);
  TextDrawFont(Result,0);
  TextDrawLetterSize(Result,0.4,1);
  TextDrawSetOutline(Result,1);
  TextDrawSetProportional(Result,1);
  TextDrawSetShadow(Result,1);
  TextDrawUseBox(Result, 1);
  TextDrawBoxColor(Result,0x00000089);
  TextDrawShowForAll(Result);
  return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)