Player Textdraw Questions -
Mamal75 - 12.12.2014
hello samp community
i have some questions about "Player Textdraws"
1.wiki:
If you use color codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
what does "255th" mean
2.i have to destroy player textdraw when player disconnects or server automaticly destroys them ?
because in wiki :
Player-textdraws are automatically destroyed when a player disconnects.
but somewhere destroyed it onplayerdisconnect
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
PlayerTextDrawDestroy(playerid, pTextdraw[playerid]);
return 1;
}
because of this i'm confused
3.if i don't make player textdraw like this: new PlayerText
Textdraw[MAX_PLAYERS];
when i change "pTextdraw" string or color or.. for all player it will be change ?!
sorry for my bad english
thanks in advance
Re: Player Textdraw Questions -
Lordzy - 12.12.2014
1) 255 is the maximum amount of characters that a textdraw string can hold.
2) Player Textdraws are automatically destroyed when a player disconnects.
3) If you're changing for the mentioned index, it will be changed for that particular playerid who has got the set index value as their ID.
But just array values being changed doesn't do anything unless they're called on the player textdraw functions.
Re: Player Textdraw Questions -
Matess - 12.12.2014
1) "What does it mean" <- 17 characters so when you use ~r~ beyond 255 chars -> crash
2) Whatever you want but you should trust wiki
3) Nope
Re: Player Textdraw Questions -
Mamal75 - 12.12.2014
tnx a lot
but i didn't got number 1
if i use one color it will use 255 character of textdraw length ?
for example if textdraw has 1024 character length, if i use one color, Remaining character length is 269 ??
Re: Player Textdraw Questions -
MythicalMarauder - 12.12.2014
1. ~r~ and ~w~ are text colors..
2. Lordzy said it.
3. I don't understand your question.
Re: Player Textdraw Questions -
Mamal75 - 12.12.2014
Quote:
Originally Posted by MythicalMarauder
1. ~r~ and ~w~ are text colors..
2. Lordzy said it.
3. I don't understand your question.
|
i know they are text colors ! i want to know that is "255th" ??
i asked a new question above
please read
Re: Player Textdraw Questions -
Matess - 12.12.2014
Quote:
255 is the maximum amount of characters that a textdraw string can hold
|
-> NO IT ISN'T
You can't use ~r~ or other colors when you reach 255 characters
"~r~Bla bla bla bla" <- OK (18 chars)
"... more than 255 chars...~g~Bla bla bla bla" <- CRASH
Re: Player Textdraw Questions -
MythicalMarauder - 12.12.2014
I really can't understand you, sorry.
Re: Player Textdraw Questions -
Mamal75 - 12.12.2014
Thanks a lot Matess and Lordzy +REPED !