Posts: 1,047
Threads: 23
Joined: Jun 2009
Quote:
Originally Posted by cyber_punk
Have you tried hiding the textdraw before destroying it? Sometime it helps sometime it doesn't. Some other things to look out for, if you are creating per player textdraws make sure you are setting all the array values to INVALID_TEXT_DRAW for example.....
Код:
new Text:somevar[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW, ...};
Doing that above to make sure all the array values are set to INVALID_TEXT_DRAW otherwise you would only set index 0 to invalid. If you are constantly creating and destroying textdraws do checks like this....
Код:
if(somevar[playerid] == Text:INVALID_TEXT_DRAW)
{
//Create the textdraw
}
When it comes time to destroy....
Код:
if(somevar[playerid] != Text:INVALID_TEXT_DRAW)
{
TextDrawHideForPlayer(playerid, somevar[playerid]);
TextDrawDestroy(somevar[playerid]);
}
Handling your text draws like so does reduce the amount of bugs, however as I stated before it still can mix together and at this time I feel like its more on samp's end. In 0.2x when we had to do TextDrawShow... after TextDrawSetString this problem did not seem to exist at least not that I remember....
|
Well Then Kalcynka has to fix the client size code of sa-mp & replace it with old Textdraw code.