08.11.2016, 14:20
PHP код:
if(dialogid == DIALOG_BANK)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(dini_Int(file, "HasBankAccount") == 0)
{
ShowPlayerDialog(playerid, DIALOG_BANK_ACCOUNTCREATE, DIALOG_STYLE_MSGBOX, "{FFFFFF}Confirmation", "{FFFFFF}Are you sure you want to create an account?\nCreating an account costs $5000.", "Confirm", "Cancel");
}
else
{
SendClientMessage(playerid, -1, "You already have an account!");
}
}
case 1:
{
}
}
return 1;
}
if(dialogid == DIALOG_BANK_ACCOUNTCREATE)
{
if(response)
{
GivePlayerMoney(playerid, -5000);
dini_IntSet(file, "HasBankAccount", 1);
SendClientMessage(playerid, COLOR_GREEN, "Congratulations, you've created a bank account!");
}
return 1;
}
}
return 1;
}
Can you please post a fix and tell me what I did wrong?