textdraw keeps dissapearing.. any suggestions?
#1

Ok i got a textdraw in my gm advertising my website and for some reason it keeps dissapearing about a minute after i connect to my server, every single time.

This is what ive got

// TextDraws
new Text:Site;


Site = TextDrawCreate(1.000000,434.000000,"www.sargesworld.net");
TextDrawAlignment(Site,0);
TextDrawBackgroundColor(Site,0x00000099);
TextDrawFont(Site,1);
TextDrawLetterSize(Site,0.500000,1.500000);
TextDrawColor(Site,0xFFFFFFAA);
TextDrawSetOutline(Site,1);
TextDrawSetProportional(Site,1);
TextDrawSetShadow(Site,1);

The main body of the textdraw is in ongamemodeinit
And i have the following in onplayerconnect

TextDrawShowForPlayer(playerid,Site);

Any help would be greatly appreciated.
Reply
#2

add a box around it, because your using the background color :/

that might help, if it doesn't, lemme know
Reply
#3

if you have any other textdraw, where you are using TextDrawDestoy function.. TextDrawDestroy may cause it..
Something like real time made of textdraw.. understand?
Reply
#4

I believe Μαστερμινδ is correct. Look inside your gamemode for a timer that does TextDrawDestroy. When TextDrawDestroy tries to destroy a textdraw that doesn't exist (like one that's been previously deleted) it will delete the last made textdraw for reasons beyond me. You should include a variable for each textdraw to show weither or not the textdraw has been created, so you can do something like:

pawn Код:
if(textdrawtoggle==1)
{
  TextDrawDestroy(textdraw);
  textdrawtoggle=0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)