Suggestion: Increase of Server-created Textdraw
#1

For Roleplay which using a high number of textdraws, it would be cool if you increase the number of textdraws which could be handled from the server at the same time, now it's 2048, a bit low, I think.
Reply
#2

Are you kidding? 2048 isn't really low.
Reply
#3

If you have 500 players on your server, each player would have 4 textdraws.

First of all, to be honest, you'll never get 500 concurrent players.

Second of all, why would you need more than 4 textdraws per player?
Reply
#4

well my speedo alone is something like 7 textdraws plus i have others .. unlimted textdraws would be nice altho unlimted anything would be even better
Reply
#5

There are many many ways to lower the amount of textdraws you're using.

Here's an example function I made for SA-N-RP
Pastebun-SetPlayerBar

It's a function
SetPlayerBar(playerid,CurrentBarColor,MaxBarColor, OutlineColor,Floatercent)
the current bar color is the part of the bar that shows the percentage. like if the bar is at 50%, the left side would be this color
the max bar color would be the right side
the outline color would be it's background

This function will only use 3 textdraws in total, no matter how many players are on the server.
Reply
#6

That function has been tested many times and works just fine.

It would only flash if it's being deleted, and in that function, TextDrawDestroy isn't being used.
Reply
#7

Then your work isn't compatible with mine. I just tested my own using this exact function without any problems between 2 players.
Reply
#8

I had it under OnPlayerUpdate changing the color with random(0xFFFFFF), I saw no sign of change on player 1. You must be showing the textdraw change even when the player isn't pressing keys, otherwise it will never do anything.
Reply
#9

2048 is very low if you're creating lots of textdraws in OnPlayerConnect.

The way to do it, is to only create textdraws for the players when they need them. For example, players don't need a speedometer when on foot, so destroy that TextDraw if they exit the vehicle. Just be careful when doing this, don't make any mistakes, as the results could be quite catastrophic ><
Reply
#10

Try create textdraws dynamically, as Blacklite said.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)