20.03.2012, 11:24
Guys help me i need help with this one
it wont write the password
or just do with integer of 0
bdw here is my code
it wont write the password
or just do with integer of 0
bdw here is my code
pawn Код:
case D_BANKREGISTER:
{
if (!response) return SendClientMessage(playerid,C_ERROR,"[ Error ]:"CWHITE" You have cancelled it ");
if(response)
{
if(!strlen(inputtext)) return SendClientMessage(playerid,C_ERROR,"[ Error ]:"CWHITE" Invalid pin number");
if(!isnumeric(inputtext)) return SendClientMessage(playerid,C_ERROR,"[ Error ]:"CWHITE" Invalid pin number");
if(strval(inputtext) < 6 || strval(inputtext) >6) return 1;
{
new INI:Data = INI_Open(BPATH(playerid));
INI_SetTag(Data,"data");
INI_WriteInt(Data,"Password",strval(inputtext));
INI_WriteInt(Data,"Cash",0);
INI_Close(Data);
}
}
}
case D_BANKLOGIN:
{
if (!response) return SendClientMessage(playerid,C_ERROR,"[ Error ]:"CWHITE" You have cancelled it ");
if(response)
{
if(strval(inputtext) == pbData[playerid][bPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
SendClientMessage(playerid,C_BOT,"Enricka:"CWHITE" You have succesfull loged in to your bank account");
ShowPlayerDialog(playerid,D_BANK,LIST,""CSERVER"RicaNiel - "CWHITE"Bank System","Balance\r\nDeposit\r\nWithdraw","Proceed","Cancel");
}
else
{
SendClientMessage(playerid,C_ERROR,"[ Error ]:"CWHITE" Please enter your 6 pin digin again");
}
}
}
}
pawn Код:
stock BPATH(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),R_BANKPATH,playername);
return string;
}
Код:
[data] Password = 0 Balance = 0