[HELP] Random TextDraw
#1

Hello

I'm make random textdraws for my server.
Picture:


pawn Код:
1. "~Y~D-Link:_~W~Koristite_~R~/gps_~W~_da_pronadjete_vaznije_lokacije_na_serveru.",
So, every time when I change color, string get in new line...

How to fix it?
Reply
#2

Just changing the colour in a textdraw string doesnt start a new line.

Post your textdraw code or look for ~n~. Any ~n~ will start a new line.
Reply
#3

String code:

pawn Код:
"~Y~D-Link:_~W~Koristite_~R~/gps_~W~_da_pronadjete_vaznije_lokacije_na_serveru.",
Reply
#4

Why all the "_"?

Use this:
pawn Код:
"~y~D-Link: ~w~Koristite ~r~/gps ~w~da pronadjete vaznije lokacije na serveru."
Reply
#5

Worse
Every word is now in new line:
Reply
#6

All the _ Create new lines, dont use them!

"~y~D-Link: ~W~Koristite ~R~/gps ~W~da pronadjete vaznije lokacije na serveru.",
Reply
#7

I do not think so.

First image with _ :

pawn Код:
"~Y~D-Link:_~W~Koristite_~R~/gps_~W~_da_pronadjete_vaznije_lokacije_na_serveru."
Second image with no _ :

pawn Код:
"~y~D-Link: ~w~Koristite ~r~/gps ~w~da pronadjete vaznije lokacije na serveru."
Reply
#8

Show us your entire TextDrawCreate lines (including fonts/sizes) etc.
Reply
#9

"~y~D-Link: ~w~Korisite ~r~GPS ~w~da pronadjete vaznije lokacije na serveru"
Reply
#10

OnGameModeInit:

pawn Код:
poruke = SetTimer("NPoruke", 30000, true); // timer for random messages
   
    Texto = TextDrawCreate(260.000000,222.000000," "); // center position, just for testing
    TextDrawSetShadow(Texto,0);
    TextDrawUseBox(Texto,0);
    TextDrawSetOutline(Texto,1);
    TextDrawFont(Texto,1);
    TextDrawBoxColor(Texto,0x0000155);
    TextDrawLetterSize(Texto,0.260000,1.200000);
    TextDrawTextSize(Texto,3.599999,3.000000);
NPoruke (random messages):

pawn Код:
public NPoruke()
{
    new string[128];
    new npor = random(sizeof(NasumicnePoruke));
    format(string, sizeof(string), "%s", NasumicnePoruke[npor]);
    TextDrawSetString(Text:Texto,string);
    TextDrawShowForAll(Text:Texto);
    return 1;
}
NasumicnePoruke:
pawn Код:
new NasumicnePoruke[][] =
{
    "~Y~D-Link:_~W~Koristite_~R~/gps_~W~_da_pronadjete_vaznije_lokacije_na_serveru."
};
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)