Hallo Breadfish
ich habe TextDraw zum Clicken erstellt aber wenn sich das TextDraw öffnet und ich ESC drücke bleibt das TextDraw einfach im bild und verschwindet nicht
C
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == LoginString[12])//Login
{
new query[255];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
mysql_format(handle, query, sizeof(query), "SELECT id FROM users WHERE name = '%e'", sendername);
mysql_pquery(handle, query, "OnUserCheck", "d", playerid);
}
if(clickedid == Bankmenu[10])//Kontostand
{
new bank = PlayerInfo[playerid][pAccount];
new s[128];
format(s,sizeof(s),"Du hast %d$ auf dein Bankkonto",bank);
ShowPlayerDialog(playerid,Kontostand,DIALOG_STYLE_MSGBOX,"Kontostand",s,"","Verlassen");
}
if(clickedid == Bankmenu[11])//Einzahlen
{
new bank = PlayerInfo[playerid][pAccount];
new s[128];
format(s,sizeof(s),"Kontostand: %d$\nWie viel möchtest du auf dein Konto einzahlen?",bank);
ShowPlayerDialog(playerid,Einzahlen,DIALOG_STYLE_INPUT,"Einzahlen",s,"Einzahlen","Zurück");
}
if(clickedid == Bankmenu[12])//Auszahlen
{
new bank = PlayerInfo[playerid][pAccount];
new s[128];
format(s, sizeof(s), "Kontostand: %d$\nWie viel möchstes du von deinem Konto abheben?", bank);
ShowPlayerDialog(playerid,Auszahlen, DIALOG_STYLE_INPUT,"Abheben", s, "Abheben", "Zurück");
}
if(clickedid == Bankmenu[13])//Ueberweisen
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, "Das kann man erst ab Level 3!");
TextDrawHideForPlayer(playerid, Bankmenu[0]);
TextDrawHideForPlayer(playerid, Bankmenu[1]);
TextDrawHideForPlayer(playerid, Bankmenu[2]);
TextDrawHideForPlayer(playerid, Bankmenu[3]);
TextDrawHideForPlayer(playerid, Bankmenu[4]);
TextDrawHideForPlayer(playerid, Bankmenu[5]);
TextDrawHideForPlayer(playerid, Bankmenu[6]);
TextDrawHideForPlayer(playerid, Bankmenu[7]);
TextDrawHideForPlayer(playerid, Bankmenu[8]);
TextDrawHideForPlayer(playerid, Bankmenu[9]);
TextDrawHideForPlayer(playerid, Bankmenu[10]);
TextDrawHideForPlayer(playerid, Bankmenu[11]);
TextDrawHideForPlayer(playerid, Bankmenu[12]);
TextDrawHideForPlayer(playerid, Bankmenu[13]);
return 1;
}
new bank = PlayerInfo[playerid][pAccount];
new s[128];
format(s, sizeof(s), "Kontostand: %d$\nGebe bitte die ID des Users an, an den du Überweisen willst.", bank);
ShowPlayerDialog(playerid,Uberweisen, DIALOG_STYLE_INPUT, "Bank Überweisung", s, "Weiter", "Zurück");
}
CancelSelectTextDraw(playerid);
TextDrawHideForPlayer(playerid, Bankmenu[0]);
TextDrawHideForPlayer(playerid, Bankmenu[1]);
TextDrawHideForPlayer(playerid, Bankmenu[2]);
TextDrawHideForPlayer(playerid, Bankmenu[3]);
TextDrawHideForPlayer(playerid, Bankmenu[4]);
TextDrawHideForPlayer(playerid, Bankmenu[5]);
TextDrawHideForPlayer(playerid, Bankmenu[6]);
TextDrawHideForPlayer(playerid, Bankmenu[7]);
TextDrawHideForPlayer(playerid, Bankmenu[8]);
TextDrawHideForPlayer(playerid, Bankmenu[9]);
TextDrawHideForPlayer(playerid, Bankmenu[10]);
TextDrawHideForPlayer(playerid, Bankmenu[11]);
TextDrawHideForPlayer(playerid, Bankmenu[12]);
TextDrawHideForPlayer(playerid, Bankmenu[13]);
TextDrawHideForPlayer(playerid, LoginString[9]);
PlayerTextDrawHide(playerid, ABC[playerid]);
TextDrawHideForPlayer(playerid, LoginString[12]);
TextDrawHideForPlayer(playerid, LoginString[11]);
}
return 1;
}
Alles anzeigen
mfg Paddy87