28/11/2020 19:10
Estou fazendo um sistema de banco com textdraw clicável, ai eu fiz Sacar, depositar e Saldo, um abaixo do outro, porém quando eu tento apertar em saldo, abre é a dialog de sacar, sendo que as dialog tá tudo certinho, ja verifiquei isso. Por que acontece isso? Como posso resolver este problema?
imagens: https://imgur.com/a/t5qwddh
Fiz este esboço pra mostrar o problema.
imagens: https://imgur.com/a/t5qwddh
Código PHP:
#include a_samp
#include zcmd
new
PlayerText:Textdraw7, PlayerText:Textdraw8, PlayerText:Textdraw9
;
public OnPlayerSpawn(playerid)
{
Textdraw7 = CreatePlayerTextDraw(playerid, 282.000000, 225.000000, "Saldo");
PlayerTextDrawFont(playerid, Textdraw7, 1);
PlayerTextDrawLetterSize(playerid, Textdraw7, 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Textdraw7, -7601921);
PlayerTextDrawSetShadow(playerid, Textdraw7, 1);
PlayerTextDrawSetSelectable(playerid, Textdraw7, 1);
Textdraw8 = CreatePlayerTextDraw(playerid, 272.000000, 195.000000, "Depositar");
PlayerTextDrawFont(playerid, Textdraw8, 1);
PlayerTextDrawLetterSize(playerid, Textdraw8, 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Textdraw8, -7601921);
PlayerTextDrawSetShadow(playerid, Textdraw8, 1);
PlayerTextDrawSetSelectable(playerid, Textdraw8, 1);
Textdraw9 = CreatePlayerTextDraw(playerid, 282.000000, 165.000000, "Sacar");
PlayerTextDrawFont(playerid, Textdraw9, 1);
PlayerTextDrawLetterSize(playerid, Textdraw9, 0.500000, 1.000000);
PlayerTextDrawColor(playerid, Textdraw9, -7601921);
PlayerTextDrawSetShadow(playerid, Textdraw9, 1);
PlayerTextDrawSetSelectable(playerid, Textdraw9, 1);
return 1;
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == Textdraw7)
{
SendClientMessage(playerid, -1, "Seu saldo é de x");
}
if(playertextid == Textdraw8)
{
GivePlayerMoney(playerid, 10000);
}
if(playertextid == Textdraw9)
{
GivePlayerMoney(playerid, -10000);
}
return 1;
}
stock Bancoxx(playerid)
{
PlayerTextDrawShow(playerid, Textdraw7);PlayerTextDrawShow(playerid, Textdraw8);
PlayerTextDrawShow(playerid, Textdraw9); SelectTextDraw(playerid, 0xFF0000AA);
return 1;
}
CMD:banco(playerid)
{
Bancoxx(playerid);
return 1;
}
Fiz este esboço pra mostrar o problema.