I need help with bank system!
#5

Код:
You mean this?
GetPlayerName(playerid,pName,sizeof(pName));
		  PlayerInfo[playerid][CardOwner]=1;
		  new INI:PFile=INI_Open(UserPath(playerid));//FIRST WE OPEN HIS ACCOUNT file
		  INI_SetTag(PFile,"Data");//we set the tag
		  INI_WriteInt(PFile,"CardOwner",PlayerInfo[playerid][CardOwner]);//we tell the DataBase that he now HAS a card
		  INI_Close(PFile);//we close the file
		  format(BankInfo[playerid][Owner],24,"%s",pName);
		  new INI:bFile=INI_Open(BankDB(playerid));//NOW we open his Bank DataBase file(actually,because he's buying card,we're creating IT,as the file DOES NOT exist
		  INI_SetTag(bFile,"BankData");//we set the tag
		  INI_WriteString(bFile,"Owner",BankInfo[playerid][Owner]);//we store the owner
		  INI_WriteInt(bFile,"DepositedMoney",BankInfo[playerid][DepositedMoney]);//we store the deposited ammount
		  INI_WriteInt(bFile,"CardNumber",BankInfo[playerid][CardNumber]);//we store his card number
		  INI_Close(bFile);

this is how its saved in my script files path this is the BankInfo
[BankData]
Owner = Balta11
DepositedMoney = 0
CardNumber = 1001

and this is pInfo 
[data]
Password = 7BDA63A0179F8D40D1B2BDD82269FEBAC123ED7585D19C6AEFC2E0050AD067D7E6A8C9A9AAD8D09ED729565F52E54E50B1FD3734FADCAA308231394B6060F84
Novac = 10000
Admin = 0
Ubistva = 0
Smrti = 0
Level = 0
Godine = 5
Porijeklo = 0
Spol = 0
CardOwner = 1
Reply


Messages In This Thread
I need help with bank system! - by baba1234 - 18.05.2015, 19:49
Re: I need help with bank system! - by Konstantinos - 18.05.2015, 19:51
Re: I need help with bank system! - by baba1234 - 18.05.2015, 19:54
Re: I need help with bank system! - by Konstantinos - 18.05.2015, 19:59
Re: I need help with bank system! - by baba1234 - 18.05.2015, 20:04
Re: I need help with bank system! - by Konstantinos - 18.05.2015, 20:12
Re: I need help with bank system! - by baba1234 - 18.05.2015, 20:23

Forum Jump:


Users browsing this thread: 3 Guest(s)