Can this lag my server ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Can this lag my server ? (
/showthread.php?tid=394738)
Can this lag my server ? -
dud - 23.11.2012
Can this lag my server ?
Код:
public OnGameModeInit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
gro[i] = TextDrawCreate(542.000000, 370.000000, "_");
TextDrawBackgroundColor(gro[i], -16776961);
TextDrawFont(gro[i], 1);
TextDrawLetterSize(gro[i], 0.219999, 1.799999);
TextDrawColor(gro[i], -1);
TextDrawSetOutline(gro[i], 0);
TextDrawSetProportional(gro[i], 1);
TextDrawSetShadow(gro[i], 0);
gro1[i] = TextDrawCreate(542.000000, 370.000000, "_");
TextDrawBackgroundColor(gro1[i], -16776961);
TextDrawFont(gro1[i], 1);
TextDrawLetterSize(gro1[i], 0.219999, 1.799999);
TextDrawColor(gro1[i], -1);
TextDrawSetOutline(gro1[i], 0);
TextDrawSetProportional(gro1[i], 1);
TextDrawSetShadow(gro1[i], 0);
gro1[i] = TextDrawCreate(542.000000, 370.000000, "_");
TextDrawBackgroundColor(gro1[i], -16776961);
TextDrawFont(gro1[i], 1);
TextDrawLetterSize(gro1[i], 0.219999, 1.799999);
TextDrawColor(gro1[i], -1);
TextDrawSetOutline(gro1[i], 0);
TextDrawSetProportional(gro1[i], 1);
TextDrawSetShadow(gro1[i], 0);
}
}
Re: Can this lag my server ? -
McCarthy - 23.11.2012
How many slots do you have?
Re: Can this lag my server ? -
dud - 23.11.2012
Quote:
Originally Posted by McCarthy
How many slots do you have?
|
400 slots
Re : Can this lag my server ? -
Vukilore - 23.11.2012
Use Player Textdraw instead
Re: Can this lag my server ? -
[D]ry[D]esert - 23.11.2012
it may, but you could use it on player connect.
Re: Can this lag my server ? -
Babul - 23.11.2012
creating 1200 textdraws wont cause any lag - its just the initialisation part, which gets called.. let me count... 1 time only
Re: Can this lag my server ? -
2KY - 23.11.2012
No, but unless you're changing the values of those textdraws you won't need to create them for every player.
Re: Can this lag my server ? -
optimus.prime - 23.11.2012
If you use it smart, it wont, but be carefull.
Respuesta: Can this lag my server ? -
Parka - 23.11.2012
I recommend using
PlayerTextDraw or
foreach By ******
because there is only using 1500 textdraw
Re: Can this lag my server ? -
Tamer - 24.11.2012
I don't think it would!