14.04.2012, 23:09
TextDrawHideForPlayer() doesn't work for some reason. When I type in "/show" it shows the textdraw and the message in chat, but when I type in "/hide" it only shows the message in chatbox and doesn't hide the textdraw. Here's the code:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new Text:debugtext;
debugtext = TextDrawCreate(320,320,"debug");
if(!strcmp(cmdtext, "/show", true))
{
TextDrawShowForPlayer(playerid, debugtext);
SendClientMessage(playerid, 0xFFFFFFFF, "textdraw on");
return 1;
}
if(!strcmp(cmdtext, "/hide", true))
{
TextDrawHideForPlayer(playerid, debugtext);
SendClientMessage(playerid, 0xFFFFFFFF, "textdraw off");
return 1;
}
}

