15.07.2012, 13:16
(
Последний раз редактировалось Cjgogo; 16.07.2012 в 08:23.
)
PROBLEM FIXED!!!TOPIC CLOSED!!!
if(dialogid==21)
{
if(response==0||response==1) return SendClientMessage(playerid,COLOR_GREEN,"Enjoy the power brought to you by IBSA(International Bank of San Andreas)!");
}
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
#define bPATH "/BankDB/%s.ini"
#define DIALOG_CARDINFO 21
enum bInfo
{
Owner[MAX_PLAYER_NAME],
CardNumber,
DepositedMoney
}
new BankInfo[MAX_PLAYERS][bInfo];
stock BankDB(playerid)
{
new string[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),bPATH,pName);
return string;
}
public OnPlayerConnect(playerid)
{
if(fexist(BankDB(playerid)))
{
INI_ParseFile(BankDB(playerid), "LoadBank_%s", .bExtra = true, .extra = playerid);
}
return 1;
}
COMMAND:cardinfo(playerid,params[])
{
if(GetPVarInt(playerid,"CardOwner") ==0) return SendClientMessage(playerid,COLOR_RED,"You don't have a bank card,go buy one for ONLY 500$!");
else
{
new string[128];
format(string,sizeof(string),"Card Owner:%s\nCard Number:%d\nDeposited Money:%d\n\n IBSA-POWER to you!",BankInfo[playerid][Owner],BankInfo[playerid][CardNumber],BankInfo[playerid][DepositedMoney]);
ShowPlayerDialog(playerid,DIALOG_CARDINFO,DIALOG_STYLE_MSGBOX,"International Bank of SA",string,"OK","Cancel");
}
return 1;
}
[BankData] Owner = [LSCS]Eddie DepositedMoney = 100 CardNumber = 1000