Filterscript Bank

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Ich brauche auch sowas, aber in JEDEM 24/7 shop.


    OHNE bugs man sollte darein gehen und dann sollte man die befehle:


    /einzahlen [SUMME]


    /abheben [SUMME]


    /konto (SUMME die auf dem KONTO ist sollte man dann sehen)


    Das geld sollte da gespeichert werden und nach einem RC gmx server neustart immernoch drauf sein!


    bitte um hilfe

  • habe jezz n banscript gefunden, jetzt eine frage:


    if(GetPlayerInterior(playerid) == interiorid && PlayerToPoint(...)


    wo muss ich das hinmachen wenn ich nur in diesem interrior diese befehle machen kann:


    if(strcmp(cmd,"/balance",true) == 0)
    {
    new playername[24];
    GetPlayerName(playerid,playername,sizeof(playername));
    new file[256];
    format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
    if(!dini_Exists(file))
    {
    SendClientMessage(playerid,DarkGreen,"You don't have a bank account! Use /bankregister [password]");
    return 1;
    }
    if(!BankLogged[playerid])
    {
    SendClientMessage(playerid,DarkGreen,"You are not logged in! Use /banklogin [password]");
    return 1;
    }
    new balance=dini_Int(file,"balance");
    format(file,sizeof(file),"Bank Balance : $%d",balance);
    SendClientMessage(playerid,DarkGreen,file);
    return 1;
    }
    if(strcmp(cmd,"/bankregister",true)==0)
    {
    new tmp[256];
    new file[256];
    new playername[24];
    tmp=strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,DarkGreen,"USAGE : /bankregister [password]");
    return 1;
    }
    GetPlayerName(playerid,playername,sizeof(playername));
    format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
    if(dini_Exists(file))
    {
    SendClientMessage(playerid,DarkGreen,"A bank account is already registered under this name! Use /banklogin [password]");
    return 1;
    }
    dini_Create(file);
    dini_IntSet(file,"password",udb_hash(tmp));
    dini_IntSet(file,"balance",-100);
    BankLogged[playerid]=false;
    SendClientMessage(playerid,DarkGreen,"You have successfully registered a bank account! Use /banklogin [password] to login into the bank account!");
    return 1;
    }
    if(strcmp(cmd,"/banklogin",true)==0)
    {
    new tmp[256];
    new playername[24];
    new file[256];
    tmp=strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,DarkGreen,"USAGE : /banklogin [password]");
    return 1;
    }
    GetPlayerName(playerid,playername,sizeof(playername));
    format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
    if(!dini_Exists(file))
    {
    SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
    return 1;
    }
    if(BankLogged[playerid])
    {
    SendClientMessage(playerid,DarkGreen,"You are already banklogged, dummy!");
    return 1;
    }
    new fpass;
    fpass=dini_Int(file,"password");
    if(fpass == udb_hash(tmp))
    {
    BankLogged[playerid]=true;
    SendClientMessage(playerid,DarkGreen,"You have successfully logged in!");
    return 1;
    }
    else
    {
    SendClientMessage(playerid,DarkGreen,"Invalid password!");
    return 1;
    }
    }
    if(strcmp(cmd,"/deposit",true)==0)
    {
    new tmp[256];
    new playername[24];
    new file[256];
    new amount;
    tmp=strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,DarkGreen,"USAGE : /deposit [amount]");
    return 1;
    }
    amount=strval(tmp);
    GetPlayerName(playerid,playername,sizeof(playername));
    format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
    if(!dini_Exists(file))
    {
    SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
    return 1;
    }
    if(!BankLogged[playerid])
    {
    SendClientMessage(playerid,DarkGreen,"You are not banklogged! USe /banklogin [password]");
    return 1;
    }
    if(GetPlayerMoney(playerid) < amount || amount <= 0)
    {
    SendClientMessage(playerid,DarkGreen,"Invalid transaction amount!");
    return 1;
    }
    GivePlayerMoney(playerid,-amount);
    new famount=dini_Int(file,"balance");
    dini_IntSet(file,"balance",famount+amount);
    format(file,sizeof(file),"You have deposited $%d in your bank account!",amount);
    SendClientMessage(playerid,DarkGreen,file);
    return 1;
    }
    if(strcmp(cmd,"/withdraw",true)==0)
    {
    new tmp[256];
    new playername[24];
    new file[256];
    new amount;
    tmp=strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,DarkGreen,"USAGE : /withdraw [amount]");
    return 1;
    }
    amount=strval(tmp);
    GetPlayerName(playerid,playername,sizeof(playername));
    format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
    if(!dini_Exists(file))
    {
    SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
    return 1;
    }
    if(!BankLogged[playerid])
    {
    SendClientMessage(playerid,DarkGreen,"You are not banklogged! USe /banklogin [password]");
    return 1;
    }
    new balance=dini_Int(file,"balance");
    if(balance < amount || amount <= 0)
    {
    SendClientMessage(playerid,DarkGreen,"Invalid transaction amount!");
    return 1;
    }
    GivePlayerMoney(playerid,amount);
    dini_IntSet(file,"balance",balance-amount);
    format(file,sizeof(file),"You have withdrew $%d from your bank account!",amount);
    SendClientMessage(playerid,DarkGreen,file);
    return 1;
    }
    if(strcmp(cmd,"/transfer",true)==0)
    {
    new tmp[256];
    new playername[24];
    new file[256];
    new amount;
    new victimid;
    new victimname[24];
    tmp=strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,DarkGreen,"USAGE : /transfer [playerid] [amount]");
    return 1;
    }
    victimid=strval(tmp);
    tmp=strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,DarkGreen,"USAGE : /transfer [playerid] [amount]");
    return 1;
    }
    if(!IsPlayerConnected(victimid) || playerid == victimid)
    {
    SendClientMessage(playerid,DarkGreen,"Invalid Player ID!");
    return 1;
    }
    amount=strval(tmp);
    GetPlayerName(playerid,playername,sizeof(playername));
    format(file,sizeof(file),"/XcBankAccs/%s.xcu",udb_encode(playername));
    GetPlayerName(victimid,victimname,sizeof(victimname));
    format(tmp,sizeof(tmp),"/XcBankAccs/%s.xcu",udb_encode(victimname));
    if(!dini_Exists(file))
    {
    SendClientMessage(playerid,DarkGreen,"You do not have a bank account! Use /bankregister [password]");
    return 1;
    }
    if(!dini_Exists(tmp))
    {
    SendClientMessage(playerid,DarkGreen,"The specified player ID doesn't have a bank account!");
    return 1;
    }
    if(!BankLogged[playerid])
    {
    SendClientMessage(playerid,DarkGreen,"You are not banklogged! USe /banklogin [password]");
    return 1;
    }
    new pbalance=dini_Int(file,"balance");
    new vbalance=dini_Int(tmp,"balance");
    if(pbalance < amount || amount <= 0)
    {
    SendClientMessage(playerid,DarkGreen,"Invalid transaction amount!");
    return 1;
    }
    dini_IntSet(file,"balance",pbalance-amount);
    dini_IntSet(tmp,"balance",vbalance+amount);
    format(file,sizeof(file),"You have successfully tranfered %d to %s's bank account!",amount,victimname);
    SendClientMessage(playerid,DarkGreen,file);
    format(file,sizeof(file),"%s has sent %d in your bank account!",playername,amount);
    SendClientMessage(victimid,DarkGreen,file);
    return 1;
    }



    ich weiß echt nicht weiter

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen