18.07.2009, 10:39
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:
And this is my text draw creating command which works:
But my editing commands doesn't work. This is one of my editing commands:
There is no compiling errors, the edit commands just won't work in-game. Any help?
pawn Код:
new Text:TextDraw;
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;
}
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;
}
![confused](images/smilies/confused.gif)