Bank account - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bank account (
/showthread.php?tid=333223)
Bank account -
DannySnoopy - 10.04.2012
hey fellas, i'v made a bank account, which gives you random password and saves, everything works fine
Only when i enter the pass in the Dialog, it says it's incorrect idk why.
here's the dialog
Код:
switch( dialogid )
{
case DIALOG_BANKACCOUNT:
{
if( response )
{
new Baccount;
if(Baccount == PlayerInfo[playerid][pBaccount])
{
ShowPlayerDialog( playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "{FFFFFF}Bank", "Balance \nWithdraw \nDeposit", "Ok", "Close" );
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Wrong password!");
}
return 1;
}
}
Re: Bank account -
WardenCS - 10.04.2012
Baccount is defined as nothing? add smth like uhm
Код:
Baccount = strlen(inputtext);
Re: Bank account -
DannySnoopy - 10.04.2012
Quote:
Originally Posted by WardenCS
Baccount is defined as nothing? add smth like uhm
Код:
Baccount = strlen(inputtext);
|
why inputtext? i have a cmd that you type inside the bank and it gives you random numbers, so basicly you haven't
enter anything.
Re: Bank account -
Ronaldo_raul™ - 10.04.2012
pawn Код:
switch( dialogid )
{
case DIALOG_BANKACCOUNT:
{
if( response )
{
new Baccount;
if(strlen(inputtext) == PlayerInfo[playerid][pBaccount])
{
ShowPlayerDialog( playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "{FFFFFF}Bank", "Balance \nWithdraw \nDeposit", "Ok", "Close" );
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Wrong password!");
}
return 1;
}
}
Not sure :S
Re: Bank account -
WardenCS - 10.04.2012
Quote:
Originally Posted by DannySnoopy
hey fellas, i'v made a bank account, which gives you random password and saves, everything works fine
Only when i enter the pass in the Dialog, it says it's incorrect idk why.
|
but here you did say that it says the password is wrong
Re: Bank account -
DannySnoopy - 10.04.2012
Quote:
Originally Posted by Ronaldo_raul™
pawn Код:
switch( dialogid ) { case DIALOG_BANKACCOUNT: { if( response ) { new Baccount; if(strlen(inputtext) == PlayerInfo[playerid][pBaccount]) { ShowPlayerDialog( playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "{FFFFFF}Bank", "Balance \nWithdraw \nDeposit", "Ok", "Close" ); } else { SendClientMessage(playerid,COLOR_GREY,"Wrong password!"); } return 1; } }
Not sure :S
|
nah didn't work
Re: Bank account -
Ronaldo_raul™ - 10.04.2012
Quote:
Originally Posted by DannySnoopy
nah didn't work
|
What actually happens ? What is incorrect ? Can you be more specific ?
Re: Bank account -
DannySnoopy - 10.04.2012
Quote:
Originally Posted by WardenCS
but here you did say that it says the password is wrong
|
Look, i have a command /bankaccount -> gives you a random pass, and to access you're bank account, you need
to enter the password.
Quote:
Originally Posted by Ronaldo_raul™
What actually happens ? What is incorrect ? Can you be more specific ?
|
just gave me wrong pass message.
Re: Bank account -
Ronaldo_raul™ - 10.04.2012
Well, than " PlayerInfo[playerid]
[pBaccount] " can be wrong. Is that the variable which saves the password. Can show the enums ?
Re: Bank account -
DannySnoopy - 10.04.2012
Quote:
Originally Posted by Ronaldo_raul™
Well, than " PlayerInfo[playerid][pBaccount] " can be wrong. Is that the variable which saves the password. Can show the enums ?
|
enum pInfo
{
pPass,<-
pCash,
pRadio,
pAdmin,
pSex,
pAge,
pLevel,
pTaxi,
pBank,
pSkin,
pTeam,
pNumber,
pBaccount,<-
pLicense,
pRank,
pAccent,
}