SA-MP Forums Archive
[HELP] Random TextDraw - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Random TextDraw (/showthread.php?tid=186047)



[HELP] Random TextDraw - Pooh7 - 27.10.2010

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?


Re: [HELP] Random TextDraw - BMUK - 27.10.2010

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.


Re: [HELP] Random TextDraw - Pooh7 - 27.10.2010

String code:

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



Re: [HELP] Random TextDraw - BMUK - 27.10.2010

Why all the "_"?

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



Re: [HELP] Random TextDraw - Pooh7 - 27.10.2010

Worse
Every word is now in new line:



Re: [HELP] Random TextDraw - Kyle - 27.10.2010

All the _ Create new lines, dont use them!

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


Re: [HELP] Random TextDraw - Pooh7 - 27.10.2010

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."



Re: [HELP] Random TextDraw - BMUK - 27.10.2010

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


Re: [HELP] Random TextDraw - Kyle - 27.10.2010

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


Re: [HELP] Random TextDraw - Pooh7 - 27.10.2010

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."
};