I have this bug, when i type /manageaccount and pin it's alright but when i try to /manageaccount 2nd time it says "HINT: BLABLABLA"
then when i try /manageaccount it works and everything goes again...
Код:
COMMAND:manageaccount(playerid, cmdtext[])
{
tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][CreatedAcc] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You must open a bank account!");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "HINT: /openaccount [PIN]");
return 1;
}
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "HINT: /manageaccount [PIN]");
return 1;
}
if(PlayerInfo[playerid][pBankPin] != strval(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Wrong pin code!");
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "HINT: If you forgot your pin code, please visit bank!");
return 1;
}
ShowPlayerDialog(playerid, BANK_DIALOG, DIALOG_STYLE_LIST, "Bank","Deposit \n Withdraw \n Check Balance\nTake Loan\nClose Account", "Select", "Cancel");
return 1;
}