Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Help not saving [Dini]

$
0
0
hello guys i created bank register system but this system is not saving the player account in files so help

PHP Code:

if (dialogid == DIALOG_BANKREG)
    {
      if (
response)
      {
          
format(string50"B_%s"playername);
          if(!
dini_Exists(AddDirFile(dir_bankfiles,string)))
          {
           
dini_Create(AddDirFile(dir_bankfilesstring));
           
temp1 dini_Int(AddDirFile(dir_bankfilesstring), "account");
           
dini_IntSet(AddDirFile(dir_bankfilesstring), "BankAccount"temp1);
           
SendClientMessage2(playeridCOLOR_GREEN"~ Account Registered.");
           
ShowPlayerDialog2(playeridDIALOG_BANKDIALOG_STYLE_LIST"San Andreas State Bank""Deposit\nWithdraw\nBalance\nSend Money\nCollect Interest\nCheck State""Select""Close");
          }
      }
      return 
1;
    } 

here when the player go in marker he get this dialog and when he click on register the acc is not saving
PHP Code:

new str[1080], pname1[MAX_PLAYER_NAME];
            
GetPlayerName(playeridpname1MAX_PLAYER_NAME);
            
format(str50"B_%s"pname1);
            if(!
dini_Exists(AddDirFile(dir_bankfiles,str)))
            {
             
ShowPlayerDialog2(playeridDIALOG_BANKREGDIALOG_STYLE_MSGBOX"San Andreas State Bank""You dont have bank account.\n\nWant to register bank account?""Yes""No");
            }
            else
            {
             
ShowPlayerDialog2(playeridDIALOG_BANKDIALOG_STYLE_LIST"San Andreas State Bank""Deposit\nWithdraw\nBalance\nSend Money\nCollect Interest\nCheck State""Select""Close");
            } 


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>