How to use vars in textdraws - 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 use vars in textdraws (
/showthread.php?tid=93228)
How to use vars in textdraws -
Zafire1410 - 23.08.2009
I need help i dont know how to use vars into a textdraw
i need something like this
Код:
Textdraw1 = TextDrawCreate(3.000000,431.000000,"$s:$s Para entregar el auto", m1, m2);
That is what i make, that obvious dont works i need help there
Re: How to use vars in textdraws -
LuxurioN™ - 23.08.2009
Use function:
Re: How to use vars in textdraws -
Zafire1410 - 23.08.2009
Quote:
Originally Posted by ► © The LuxurioN™
|
i dont understand that :S:S can you help me please i only need
Textdraw1 = TextDrawCreate(3.000000,431.000000,"(m1)

m2) Para entregar el auto");
:S:S
Re: How to use vars in textdraws -
JaTochNietDan - 24.08.2009
Just like you did the MySQL thing
format(string,sizeof(string),"Your stuff %s",var);
Then put TextDrawCreate(3.0,431.0,string);
Re: How to use vars in textdraws -
LuxurioN™ - 24.08.2009
Код:
format(tmp, sizeof(tmp), "Good Night %s ",PlayerName(playerid));
LuxText[i] = TextDrawCreate(163.000000,342.000000,tmp);
Re: How to use vars in textdraws -
Zafire1410 - 24.08.2009
thx i dont get errors in compile the problem is when enter in the server display ": para entregar el auto" dont text the vars like dont exist on something i using this fs
http://forum.sa-mp.com/index.php?topic=116078.0 for countdow
here some part of my code
pawn Код:
forward contarprin2(playerid);
new m1;
new m2;
new count2;
public OnGameModeInit()
{
AddCountDown(1, 0, 2);
LoadTextDraws();
}
public OnPlayerSpawn(playerid)
{
count2 = SetTimer("contarprin2",1000,false);
return 1;
}
public contarprin2(playerid)
{
m1 = GetCountDownMinutes(1);
m2 = GetCountDownSeconds(1);
TextDrawShowForPlayer(playerid,Textdraw1);
}
LoadTextDraws()
{
new texttt1[256];
format(texttt1, sizeof(texttt1),"%s:%s Para entregar el auto", m1, m2);
Textdraw1 = TextDrawCreate(3.000000,431.000000,texttt1);
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawFont(Textdraw1,3);
TextDrawLetterSize(Textdraw1,0.799999,1.500000);
TextDrawColor(Textdraw1,0xffffffff);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw1,1);
}
Re: How to use vars in textdraws -
LuxurioN™ - 24.08.2009
tried putting:
Код:
format(texttt1, sizeof(texttt1),"%d:%d Para entregar el auto", m1, m2);