Textdraws
#1

Hello,
I've got several questions regarding TextDraws.

1. In my server, at some point, all of the textdraws go missing. I'm not sure what causes this. I'm pretty sure you guys cant know either from my description, but could it be because I hide the textdraws instead of destroying them?

For example this is my code:
PlayerTemp[playerid][Test] = TextDrawCreate(463.333404, 25.318511, "Test");
and then when the player wants it gone, I use TextDrawHide, and once a player uses the CMD again it just creates a new Textdraw in the same variable instead of showing the hidden one? Could this be creating mass textdraws that eventually go off the samp limits and causes the bug?


2. My background overrides the main HUD(the one that includes the HP, AP and Cash) how can I push it backwards so that the cash/money/armour will be visible to the user?


Tips?
Thanks!
Reply
#2

Show us how do you show and hide them, make sure that you are using TextDrawShow and TextDrawHide tho, and add the textdraw creating stuff under OnPlayerConnect.
Reply
#3

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
Show us how do you show and hide them, make sure that you are using TextDrawShow and TextDrawHide tho, and add the textdraw creating stuff under OnPlayerConnect.
I think I handled the issue, but do you know how can I push the background backwards so it'll show the hud?
Reply
#4

Do you also destroy the textdraw when the player disconnects? PlayerTextDraw is automatically destroyed on disconnect, regular TextDraw is NOT. I think you're hitting the limit which prevents any further textdraw from being created.
Reply
#5

He's using global textdraws as per-player ones.
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
Do you also destroy the textdraw when the player disconnects? PlayerTextDraw is automatically destroyed on disconnect, regular TextDraw is NOT. I think you're hitting the limit which prevents any further textdraw from being created.
Yeah, thats what I thought.
I fixed it minutes after I posted this topic. However, the problem where the textdraw is above the main hud still exists(the textdraw has a black background and it hides the cash/ap/hp hud)
How can I fix it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)