Text Scripting Help - 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: Text Scripting Help (
/showthread.php?tid=271453)
Text Scripting Help -
EDHH - 24.07.2011
I want to make text appear in the middle of everyone's screen, each line a different color when I use a certain command. Right now when I use the command, it only appears in the chat area in green how can I change it?
Re: Text Scripting Help -
Finn - 24.07.2011
You need to use a
text draw or a
game text for that.
Game text being the easier solution:
pawn Код:
GameTextForPlayer(playerid, "~r~red ~n~~g~green ~n~~b~blue ~n~~p~pink ~n~~y~yellow", 5000, 5);
Re: Text Scripting Help -
EDHH - 24.07.2011
When I type a certain command, I send a "lotto announcement" to all the players. The text however is in the chat area and is green. I want to make it appear in the middle of the screen, in different colors.
Re: Text Scripting Help -
Sil3nc3 - 24.07.2011
pawn Код:
GameTextForAll(inputtextordefineyourdamntexthere, 5000, 3 );
Re: Text Scripting Help -
MoroDan - 24.07.2011
Quote:
Originally Posted by EDHH
When I type a certain command, I send a "lotto announcement" to all the players. The text however is in the chat area and is green. I want to make it appear in the middle of the screen, in different colors.
|
With random colors each time:
PHP код:
static const colors[][10] =
{
{"~r~"}, {"~r~~h~"}, {"~r~~h~~h~"},
{"~b~"}, {"~b~~h~"}, {"~b~~h~~h~"},
{"~g~"}, {"~g~~h~"}, {"~g~~h~~h~"},
{"~y~"}, {"~y~~h~"}, {"~y~~h~~h~"},
{"~p~"}, {"~p~~h~"}
};
format(string, sizeof(string), "%sYour text here !", colors[random(sizeof(colors))]);
GameTextForAll(string, 5000, 3 );