[HELP]Really annoying Bank System problem[HELP]!!!
#1

PROBLEM FIXED!!!TOPIC CLOSED!!!
Reply
#2

Please shwo me the dialog "DIALOG_CARDINFO".
Reply
#3

What do you mean?How I use it on OnDialogResponse?
pawn Код:
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)!");
  }
EDIT:IT WORKS before I restart the server,or reconnect...
Reply
#4

Oh, it is not what I meant. Show me please the command /deposit..
Reply
#5

i'm not that fan of y_ni, but i guess you must load their files and stock their values in variables.

You'll just have to use calllocalfunction / whatever y_si uses to load it.
Reply
#6

Make sure, you have a thing like this
pawn Код:
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
Reply
#7

OK,I take it in a very different WAY,but,please,help me ,I cannot spot problem...SO,HERE'S the simplified code,a file,and the informs extraction from the file,OK?
pawn Код:
#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;
}
OK,so now here's the file:
Код:
[BankData]
Owner = [LSCS]Eddie
DepositedMoney = 100
CardNumber = 1000
THOSE things being said,it should work,RIGHT?Well,then tell me what's wrong,why the info doesn't show
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)