18.05.2015, 20:04
Код:
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