how to make a 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: how to make a textdraw... (
/showthread.php?tid=159826)
how to make a textdraw... -
iJumbo - 14.07.2010
how to make a textdraw presentation like W(in red)(wait 1 sec)E(in blue)(wait 1 sec)L ..... C ..... o .....M.....E ?
lol my bad english understand plz
Re: how to make a textdraw... -
iJumbo - 14.07.2010
......... Helppppppppp xd
Re: how to make a textdraw... -
Nonameman - 14.07.2010
Quote:
Originally Posted by gigi1223
how to make a textdraw presentation like W(in red)(wait 1 sec)E(in blue)(wait 1 sec)L ..... C ..... o .....M.....E ?
lol my bad english understand plz
|
Sorry but I cannot understand what do you want.
Wanna make a simple textdraw?
Re: how to make a textdraw... -
ikey07 - 14.07.2010
Like this?
pawn Код:
new Text:Text1;
Text1 = TextDrawCreate(360.0,370.0,"~r~W ~w~1 sec ~b~E");
TextDrawFont(Text1,1);
TextDrawColor(Text1,0xFFFFFFFF);
TextDrawSetShadow(Text1,2);
TextDrawLetterSize(Text1,0.5,2.0);
TextDrawAlignment(Text1,2);
TextDrawTextSize(Text1,200,400);
Re: how to make a textdraw... -
Zezombia - 14.07.2010
It's a pretty big "function", so I whipped you up a quick filterscript:
pawn Код:
/* Zezombia
Welcome TextDraw Test */
#include <a_samp>
forward WelcomeTimer(playerid);
new Text:Textdraw;
public OnFilterScriptInit()
{
Textdraw = TextDrawCreate(100, 100, "Welcome"); //hint, edit position here
//hint, add more ways to visualize the TextDraw here
return 1;
}
public OnFilterScriptExit()
{
TextDrawDestroy(Textdraw);
return 1;
}
public OnPlayerConnect(playerid)
{
SetPVarInt(playerid, "Timer", SetTimerEx("WelcomeTimer", 1000, 1, "i", playerid));
return 1;
}
public WelcomeTimer(playerid)
{
new string[128];
switch(GetPVarInt(playerid, "TimerVar"))
{
case 0:
{
strpack(string, "~r~W");
TextDrawSetString(Textdraw, string);
TextDrawShowForPlayer(playerid, Textdraw);
}
case 1:
{
strpack(string, "~r~W~b~e");
TextDrawSetString(Textdraw, string);
TextDrawShowForPlayer(playerid, Textdraw);
}
case 2:
{
strpack(string, "~r~W~b~e~g~l");
TextDrawSetString(Textdraw, string);
TextDrawShowForPlayer(playerid, Textdraw);
}
case 3:
{
//hint, add more cases
}
case 7:
{
TextDrawHideForPlayer(playerid, Textdraw);
KillTimer(GetPVarInt(playerid, "Timer"));
SetPVarInt(playerid, "TimerVar", 0);
return 1;
}
}
SetPVarInt(playerid, "TimerVar", GetPVarInt(playerid, "TimerVar") + 1);
return 0;
}
That is not complete, you still have to make the textdraw look correct and put it in the correct position, and I got you as far as "W e l", you have to do the ending "c o m e".
You can find the colors here:
https://sampwiki.blast.hk/wiki/TextDraw_Text_Codes
You can find all the TextDraw functions here:
https://sampwiki.blast.hk/wiki/TextDrawCreate
(just scroll down)
I would do the rest but I don't think you learn anything like that :P. Just study the code and you'll see how it works, it fairly simple.
Re: how to make a textdraw... -
IanDaCJ - 14.07.2010
use these infront of the words..
~b~ for Blue
~g~ for Green
~l~ for Black
~p~ for Pink
~r~ for Red
~w~ for White
~y~ for Yellow
~n~ for a New line
Re: how to make a textdraw... -
iJumbo - 15.07.2010
thx all