Limiting to 6 digits. Bank system.
#3

pawn Код:
CMD:createaccount(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 10.0,10.0,10.0) || IsPlayerInRangeOfPoint(playerid, 10.0, 10.0,10.0,10.0))
    {
        new number, pin;
        if(!sscanf(params, "dd", number, pin))
        {
            if(PlayerInfo[playerid][Bank] < 3)
            {
                if(pin >= 0001 && pin <= 9999)
                {
                    if(number >= 0 && number <= 999999)
                    {
                        format(file, sizeof(file), "bank/%d.ini", number);
                        if(!dini_Exists(file))
                        {
                                             //Stuff here
                                                }
                        else return SendClientMessage(playerid, 0xFFFFFFFF, "This Bank account already exists!");
                    }
                    else return SendClientMessage(playerid, 0xFFFFFFFF, "the account number can only have 6 numbers!");
                }
                else return SendClientMessage(playerid, 0xFFFFFFFF, "Your PIN code can only have 4 digits!");
            }
            else return SendClientMessage(playerid, 0xFFFFFFFF, "You can have 3 accounts only.");
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /createaccount [Account Number] [Account Pin]");
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not at the bank!");
}
Reply


Messages In This Thread
Limiting to 6 digits. Bank system. - by ricardo178 - 11.02.2012, 22:02
Re: Limiting to 6 digits. Bank system. - by milanosie - 11.02.2012, 22:05
Re : Limiting to 6 digits. Bank system. - by ricardo178 - 11.02.2012, 22:06
Re: Limiting to 6 digits. Bank system. - by Babul - 11.02.2012, 22:06
Re: Limiting to 6 digits. Bank system. - by milanosie - 11.02.2012, 22:07
Re : Re: Limiting to 6 digits. Bank system. - by ricardo178 - 11.02.2012, 22:08
Re: Limiting to 6 digits. Bank system. - by milanosie - 11.02.2012, 22:10
Re : Limiting to 6 digits. Bank system. - by ricardo178 - 11.02.2012, 22:11
Re: Limiting to 6 digits. Bank system. - by Babul - 11.02.2012, 22:15
Re : Limiting to 6 digits. Bank system. - by ricardo178 - 11.02.2012, 22:20

Forum Jump:


Users browsing this thread: 1 Guest(s)