hallo,
ich wollt fragen wie ich ein textdraw wieder zerstöre also beende?
Hier erstele ich den:
if(strcmp(cmdtext, "/afk", true) == 0)
{
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "%s ist AFK gegangen.", pName);
SendClientMessageToAll(0xFFFF00AA, string);
TogglePlayerControllable(playerid, 0);
new Text:txtSprite1;
txtSprite1 = TextDrawCreate(0.0, 0.0, "loadsc8:loadsc8"); // Text is txdfile:texture
TextDrawFont(txtSprite1, 4); // Font ID 4 is the sprite draw font
TextDrawColor(txtSprite1,0xFFFFFFFF);
TextDrawTextSize(txtSprite1,700.0,512.0); // Text size is the Width:Height
TextDrawShowForPlayer(playerid,txtSprite1);
}
hier will ich den beenden:
if(strcmp(cmdtext, "/back", true) == 0)
{
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "%s ist nun wieder zurück.", pName);
SendClientMessageToAll(0xFFFF00AA, string);
TogglePlayerControllable(playerid, 1);
SetPlayerHealth(playerid, 100);
DestroyTextDraw(playerid,txtSprite1);//wie geht das? das ist ja falsch..
return 1;
}