In-game text draw creating problem
#1

Well, I got a problem. I can create the textdraw in game, and I see it, but I can't edit it. I added this at the top:

pawn Код:
new Text:TextDraw;
And this is my text draw creating command which works:

pawn Код:
dcmd_td(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new string[256];
if(!strlen(params))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /td [text]");
return 1;
}
format(string, sizeof(string), "%s", params);
TextDraw = TextDrawCreate(20.0, 260.0, string);
TextDrawColor(Text:TextDraw, COLOR_RED);
TextDrawFont(Text:TextDraw, 3);
TextDrawUseBox(Text:TextDraw, false);
TextDrawShowForAll(TextDraw);
return 1;
}
else return 0;
}
But my editing commands doesn't work. This is one of my editing commands:

pawn Код:
dcmd_tdusebox(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if(!strlen(params))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /tdusebox [yes/no]");
return 1;
}
if(strcmp(params, "yes", true) == 0)
{
TextDrawUseBox(Text:TextDraw, true);
return 1;
}
if(strcmp(params, "no", true) == 0)
{
TextDrawUseBox(Text:TextDraw, false);
return 1;
}
return 1;
}
else return 0;
}
There is no compiling errors, the edit commands just won't work in-game. Any help?
Reply


Messages In This Thread
In-game text draw creating problem - by refshal - 18.07.2009, 10:39
Re: In-game text draw creating problem - by M4S7ERMIND - 18.07.2009, 10:45
Re: In-game text draw creating problem - by refshal - 18.07.2009, 10:46
Re: In-game text draw creating problem - by M4S7ERMIND - 18.07.2009, 11:53
Re: In-game text draw creating problem - by refshal - 18.07.2009, 13:51
Re: In-game text draw creating problem - by arnutisz - 18.07.2009, 13:51
Re: In-game text draw creating problem - by refshal - 18.07.2009, 14:10

Forum Jump:


Users browsing this thread: 2 Guest(s)