TextDraws problem
#1

Hello!

Recently I've found a problem with my TextDraws (only if playerid > 45, not global textdraws - global textdraws are working fine).

So, when server reaches 45 players (id 45 atleast) will show correct the textdraws (textdraws per player) and the next ids won't see textdraws (again, textdraws per player).

What I meant with textdraws per player?

Something like this:

new Text: example[MAX_PLAYERS]; // will not work if id > 45
new Text: example2; // will work doesn't matter id.

MAX_PLAYERS in my gamemode is 100.

Example of creating a textdraw in my gamemode (OnGameModeInit):

for(new i = 0; i < MAX_PLAYERS; i++)
{
Fuell[i] = TextDrawCreate(526.000000, 156.000000, "Fuel: 98%");
TextDrawBackgroundColor(Fuell[i], 255);
TextDrawFont(Fuell[i], 2);
TextDrawLetterSize(Fuell[i], 0.280000, 1.000000);
TextDrawColor(Fuell[i], -1);
TextDrawSetOutline(Fuell[i], 1);
TextDrawSetProportional(Fuell[i], 1);
}
Reply
#2

It could mean that you're exceeding the player textdraw limit which is 256 hence why they're not appearing.


Limits:

https://sampwiki.blast.hk/wiki/Limits
Reply
#3

Yea, I think that was the problem. I will be back with an answer.
I've moved textdraws from global to per-player, i will test in this day to see if it works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)