How make this?(ChangeColor) - 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)
+--- Thread: How make this?(ChangeColor) (
/showthread.php?tid=421074)
How make this?(ChangeColor) -
ZmaXy - 08.03.2013
How change TDcolor every 1-2 seconds?
http://www.youtube.com/watch?v=fR9J9...ature=*********
Re: How make this?(ChangeColor) -
Scenario - 08.03.2013
It can be achieved through a timer. Something like this, if you're using y_timers.
pawn Код:
task autoChangeColor[1000]()
{
switch(g_ColorTD)
{
case 0:
{
TextDrawSetString(..);
g_ColorTD++;
}
case 1:
{
TextDrawSetString(..);
g_ColorTD++;
}
case 2:
{
TextDrawSetString(..);
g_ColorTD++;
}
case 3:
{
TextDrawSetString(..);
g_ColorTD++;
}
case 4:
{
TextDrawSetString(..);
g_ColorTD = 0;
}
}
return 1;
}
Re: How make this?(ChangeColor) -
ZmaXy - 08.03.2013
Mm, that code changes TextString, not color.
Btw: thanks for timer
Re: How make this?(ChangeColor) -
Scenario - 08.03.2013
Right. Well, in the video you gave it only changed the color of particular characters, not the whole textdraw. Therefore, you'd have to do that with TextDrawSetString().
Re: How make this?(ChangeColor) -
ZmaXy - 08.03.2013
Код:
: error 017: undefined symbol "i"
: error 017: undefined symbol "i"
: error 017: undefined symbol "i"
: error 017: undefined symbol "g_ColorTD"
: error 017: undefined symbol "i"
: error 017: undefined symbol "g_ColorTD"
: warning 215: expression has no effect
: error 017: undefined symbol "i"
: error 017: undefined symbol "i"
: error 017: undefined symbol "g_ColorTD"
: warning 215: expression has no effect
: error 017: undefined symbol "i"
: error 017: undefined symbol "i"
: error 017: undefined symbol "g_ColorTD"
: warning 215: expression has no effect
: error 017: undefined symbol "i"
: error 017: undefined symbol "i"
: error 017: undefined symbol "g_ColorTD"
: warning 215: expression has no effect
pawn Код:
task autoChangeColor[1000]()
{
switch(g_ColorTD)
{
case 0:
{
TextDrawSetString(LogoTD[i][1], "~g~RO");
g_ColorTD++;
}
case 1:
{
TextDrawSetString(LogoTD[i][1], "RO");
TextDrawSetString(LogoTD[i][2], "~g~O");
g_ColorTD++;
}
case 2:
{
TextDrawSetString(LogoTD[i][1], "~g~RO");
TextDrawSetString(LogoTD[i][2], "O");
g_ColorTD++;
}
case 3:
{
TextDrawSetString(LogoTD[i][1], "RO");
TextDrawSetString(LogoTD[i][2], "~g~O");
g_ColorTD++;
}
}
return 1;
}
Re: How make this?(ChangeColor) -
ZmaXy - 08.03.2013
bump
Re : How make this?(ChangeColor) -
yusei - 08.03.2013
try to use a Timer