[TEXTDRAW] Help about limits.
#1

Hello, i had been using around 40 global textdraws years ago. Now, i have added an ARRAY of around 36 textdraws. Now, for some wierd reason, people are not seeeing textdraws after ID ~50.

I still cannot understand the point of global textdraw and samp limits. If i have 80 global TD-S created, that means only 80x25 players~2048 can see it? And should i use player textdraws for static and global for changing variables?

Please help, now neither people from ID 50 cannot see, neither to talk about 450 ID ..
Reply
#2

https://sampwiki.blast.hk/wiki/Limits Limit of the global textdraws are 2048 therefore limits ain't your case here, you are failing to send the right ID when you want to show the td or something like that, and nah you can create 2048 global TDs
Quote:

should i use player textdraws for static and global for changing variables?

Absolutely the other way around, for example if you want to create a speedo, there is a static box around it, that should be global, but the speed of every player is different, therefore you should make that one a player one
because if you change a global TD, it would change for everyone while a player TD would change only for that player
Reply
#3

Thats impossible, because lets say i have 300 players connected, people from ~55+ Id cannot see it, they just see some PLAYERTEXTDRAWS, which i created for updating money/gold in their bank.

So point goes like this:

new Text:HazardTD[39]; //definition

OnGameModeInit textdraws initialize

Onplayerspawn

for(new i = 0; i < sizeof(HazardTD); i++)
{
TextDrawShowForPlayer(playerid, HazardTD[i]);
}

And therefore, i can see them if i connect.

But lets say when people join more and more,

They only see textdraw for updating money and gold, like:

new PlayerText:money[MAX_PLAYERS];

stock CreatePlayerTextDraws( playerid ) { // ovo

Moneytd blabla..

Onplayerspawn

PlayerTextDrawShow(playerid, money[playerid]);

forward Banka_Update();
public Banka_Update()
{
foreach(Player, i) {

new sstring[50];
format(sstring, sizeof(sstring),": ~w~%d",PlayerInfo[i][pNovacBanka]);
PlayerTextDrawSetString(i, money[i], sstring);

Please help..
Reply
#4

TextDraw should always be initialized with INVALID_TEXT_DRAW otherwise they tend to mix up a lot.

Global:
PHP код:
new Text:globalTD[39] = {Text:INVALID_TEXT_DRAW, ...}; 
Player:
PHP код:
new PlayerText:playerTD[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...}; 
As far as I can see nothing else is wrong and this should just work. Amount of connected players has nothing to do with it. You might try running crashdetect to see if something else is screwed which might be interfering.
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
TextDraw should always be initialized with INVALID_TEXT_DRAW otherwise they tend to mix up a lot.

Global:
PHP код:
new Text:globalTD[39] = {Text:INVALID_TEXT_DRAW, ...}; 
Player:
PHP код:
new PlayerText:playerTD[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...}; 
As far as I can see nothing else is wrong and this should just work. Amount of connected players has nothing to do with it. You might try running crashdetect to see if something else is screwed which might be interfering.
Thank you, i have added this and it seems to be working now.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)