23.03.2012, 02:16
I have a problem with textdraws on SetTimerEx:
This only shows "Test" in the screen:
Same function, but called directly shows all the textdraws:
That shows: "Test Text"
Is there any problem passing several textdraws through a timer?
I have to un-tag them because otherwise i get a compiler warning.
This only shows "Test" in the screen:
pawn Код:
T_Buffer[0] = TextDrawCreate(320.000000, 130.000000, "Test");
TextDrawAlignment(T_Buffer[0], 2);
TextDrawBackgroundColor(T_Buffer[0], 255);
TextDrawFont(T_Buffer[0], 1);
TextDrawLetterSize(T_Buffer[0], 1.300000, 4.000000);
TextDrawColor(T_Buffer[0], -16776961);
TextDrawSetOutline(T_Buffer[0], 0);
TextDrawSetProportional(T_Buffer[0], 1);
TextDrawSetShadow(T_Buffer[0], 1);
T_Buffer[1] = TextDrawCreate(320.000000, 160.000000, "Text");
TextDrawAlignment(T_Buffer[1], 2);
TextDrawBackgroundColor(T_Buffer[1], 255);
TextDrawFont(T_Buffer[1], 1);
TextDrawLetterSize(T_Buffer[1], 1.300000, 4.000000);
TextDrawColor(T_Buffer[1], -16776961);
TextDrawSetOutline(T_Buffer[1], 0);
TextDrawSetProportional(T_Buffer[1], 1);
TextDrawSetShadow(T_Buffer[1], 1);
pawn Код:
SetTimerEx("ShowText",500,false,"iii",playerid,_:T_Buffer[0],_:T_Buffer[1]);
pawn Код:
forward ShowText( playerid, ... );
public ShowText( playerid, ... )
{
new cnt = numargs();
for( new i=;i<cnt; i++ )
{
new Text:draw = Text:getarg(i, 0);
TextDrawShowForPlayer( playerid, draw );
}
}
pawn Код:
ShowText( playerid,_:T_Buffer[0],_:T_Buffer[1] );
Is there any problem passing several textdraws through a timer?
I have to un-tag them because otherwise i get a compiler warning.