Hallo,
ich erstelle ein Textdraw kann ihn aber nicht zerstören..
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);
}
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);
TextDrawDestroy(txtSprite1[playerid]);//laut wiki.sa-mp.com ist das richtig aber es geht nicht
return 1;
}