Player Textdraw Questions
#1

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 PlayerTextTextdraw[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
Reply
#2

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.
Reply
#3

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
Reply
#4

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 ??
Reply
#5

1. ~r~ and ~w~ are text colors..
2. Lordzy said it.
3. I don't understand your question.
Reply
#6

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
Reply
#7

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
Reply
#8

I really can't understand you, sorry.
Reply
#9

Thanks a lot Matess and Lordzy +REPED !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)