hello guys i created bank register system but this system is not saving the player account in files so help
here when the player go in marker he get this dialog and when he click on register the acc is not saving
PHP Code:
if (dialogid == DIALOG_BANKREG)
{
if (response)
{
format(string, 50, "B_%s", playername);
if(!dini_Exists(AddDirFile(dir_bankfiles,string)))
{
dini_Create(AddDirFile(dir_bankfiles, string));
temp1 = dini_Int(AddDirFile(dir_bankfiles, string), "account");
dini_IntSet(AddDirFile(dir_bankfiles, string), "BankAccount", temp1);
SendClientMessage2(playerid, COLOR_GREEN, "~ Account Registered.");
ShowPlayerDialog2(playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "San Andreas State Bank", "Deposit\nWithdraw\nBalance\nSend Money\nCollect Interest\nCheck State", "Select", "Close");
}
}
return 1;
}
PHP Code:
new str[1080], pname1[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname1, MAX_PLAYER_NAME);
format(str, 50, "B_%s", pname1);
if(!dini_Exists(AddDirFile(dir_bankfiles,str)))
{
ShowPlayerDialog2(playerid, DIALOG_BANKREG, DIALOG_STYLE_MSGBOX, "San Andreas State Bank", "You dont have bank account.\n\nWant to register bank account?", "Yes", "No");
}
else
{
ShowPlayerDialog2(playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "San Andreas State Bank", "Deposit\nWithdraw\nBalance\nSend Money\nCollect Interest\nCheck State", "Select", "Close");
}