Simple Txtdraw don t work, Hel.....pe me please :D!
#1

public Website()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{

//TextDrawDestroy(Site[i]);


Site[i] = TextDrawCreate(120.000,425.000,"http://blablabla.com");
TextDrawColor(Site[i],COLOR_WHITE);
TextDrawLetterSize(Site[i], 0.5, 1.5);
TextDrawFont(Site[i], 3);
TextDrawBackgroundColor(Site[i], 0x000000AA);
TextDrawSetOutline(Site[i], 2);

TextDrawShowForPlayer(i, Site[i]);

}
return true;
}

//Ongamemodeinit
SetTimer("Website", 1000, true);

The txtdraw dont show...
Reply
#2

The problem is... ?
Reply
#3

What's the purpose of replacing a textdraw with exactly the same textdraw every minute?
Just use this:
pawn Код:
//Under Ongamemodeinit:
     Site = TextDrawCreate(120.000,425.000,"[url]http://blablabla.com"[/url]);
     TextDrawColor(Site,COLOR_WHITE);
     TextDrawLetterSize(Site, 0.5, 1.5);
      TextDrawFont(Site, 3);
      TextDrawBackgroundColor(Site, 0x000000AA);
      TextDrawSetOutline(Site, 2);

//Under OnPlayerConnect
TextDrawShowForPlayer(playerid, Site);
Reply
#4

The textdraw shows, but it desapears super fast.There is no more TextDrawHide or Destroy.
Reply
#5

Get rid of the timer, that method of showing a textdraw is not needed for this situation.

Create the textdraw via OnGameModeInit:
Код:
Site = TextDrawCreate(120.000,425.000,"http://blablabla.com");
TextDrawColor(Site,COLOR_WHITE);
TextDrawLetterSize(Site, 0.5, 1.5);
TextDrawFont(Site, 3);
TextDrawBackgroundColor(Site, 0x000000AA);
TextDrawSetOutline(Site, 2);
Then show the textdraw to the player that connects to the server.
Код:
public OnPlayerConnect(playerid)
{
   TextDrawShowForPlayer(playerid, Site);
}
Then hide the textdraw to the player that disconnects the server.
Код:
public OnPlayerDisconnect(playerid, reason)
{
   TextDrawHideForPlayer(playerid, Site);
}
Reply
#6

Textdraw shows when i connect, then it desapears ;(

/imageshack/i/txtd1.jpg/
/imageshack/i/txtdraw2.jpg/
Reply
#7

I need a help in here. All txtdraws that I try to add, they desapear after creating.
Ideas why this is happening?
Reply
#8

Maybe you have any filterscript that destroys it? Or a timer.
Or its just a bad bug.
Reply
#9

Quote:
Originally Posted by Sharks
I need a help in here. All txtdraws that I try to add, they desapear after creating.
Ideas why this is happening?
Did you delete your timer?
Reply
#10

yes, there is now timer now.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)