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))
{
SendClientMessage(playerid,0xffffffff,"sscan2 works");
if(PlayerInfo[playerid][Bank] < 3)
{
SendClientMessage(playerid,0xffffffff,"bank<3");
if(pin >= 0001 && pin <= 9999)
{
SendClientMessage(playerid,0xffffffff,"pin ok");
if(number >= 0 && number <= 999999)
{
SendClientMessage(playerid,0xffffffff,"number ok");
format(file, sizeof(file), "bank/%d.ini", number);
if(!dini_Exists(file))
{
SendClientMessage(playerid,0xffffffff,"file existing");
//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!");
}
i wont tell you how many commented lines like those my gamemode has, cant count them ^^