textdraw
#9

Quote:
Originally Posted by Florin48
Посмотреть сообщение
[MAX_PLAYERS] in new PlayerText:Player_HUD_Txd[MAX_PLAYERS][3];

is useless because the textdraw is already created for the player.
Yes, but you need to store the ID of the TD per-player, since it may be different for each player. If ID 0 connects, the TDs might be ID 0, 1, 2 for him, but a second player might get different IDs if there is anything different in the order and overwrite the slots that were saved for ID 0. From then on ID 0's TextDraw IDs are lost and show/hide functions will show other TextDraws than intended.
That is where many TD related problems come from (mixing IDs, show/hide having no effect, etc).

If you are absolutely sure the IDs always have the same order, you can do that. But otherwise you should save them per-player, especially TextDraws that are created/destroyed during runtime.
Reply


Messages In This Thread
textdraw - by Lukasz56 - 24.07.2018, 19:22
Re: textdraw - by NaS - 24.07.2018, 19:47
Re: textdraw - by Lukasz56 - 24.07.2018, 19:50
Re: textdraw - by NaS - 24.07.2018, 20:02
Re: textdraw - by Lukasz56 - 24.07.2018, 20:11
Re: textdraw - by NaS - 24.07.2018, 20:13
Re: textdraw - by Florin48 - 24.07.2018, 20:13
Re: textdraw - by Lukasz56 - 24.07.2018, 20:14
Re: textdraw - by NaS - 24.07.2018, 20:30

Forum Jump:


Users browsing this thread: 1 Guest(s)