[Pomoc] Withdraw i Deposit

Započeo ...Nikola..., Avgust 23, 2011, 11:00:04 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: FactionGame Edit
Detaljan opis problema: Da li mozete da mi napravite da kad kliknem na Withdraw da odmah izbaci Input i da kucam koliko hocu sumu i za Deposit isto tako,a Ne kao sad da biram sumu neku od ponudjenih.Meni uvek dodju erori.
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /


if(dialogid == 2000)
   {
if(response)
{
        switch(listitem)
        { //deposit
            case 0: {ShowPlayerDialog(playerid,2001,DIALOG_STYLE_LIST,"Banka","1.000$\n2.000$\n3.000$\n4.000$\n5.000$\n10.000$\n20.000$\n30.000$\n40.000$\n50.000$\n100.000$\nUnesi Iznos","Deposit","Zatvori");}
               //withdraw
case 1:{ShowPlayerDialog(playerid,2002,DIALOG_STYLE_LIST,"Banka","1.000$\n2.000$\n3.000$\n4.000$\n5.000$\n10.000$\n20.000$\n30.000$\n40.000$\n50.000$\n100.000$\nUnesi Iznos","Withdraw","Zatvori");}
               //kredit
case 2:{ShowPlayerDialog(playerid,2008,DIALOG_STYLE_LIST,"Banka","1.000$\n2.000$\n3.000$\n4.000$\n5.000$\n10.000$\n20.000$\n30.000$\n40.000$\n50.000$\n100.000$","Kredit","Zatvori");}
               //balance
case 3:
{
        format(string, sizeof(string), "Stanje vaseg racuna je %d$",PlayerInfo[playerid][pAccount]);
ShowPlayerDialog(playerid,2003,DIALOG_STYLE_MSGBOX ,"Banka",string,"Ok","Zatvori");
            }
        }
       }
   }
   if(dialogid == 2001)//deposit
   {
       if(response)
       {
           new izabranasuma;
           switch(listitem)
           {
               case 0:{izabranasuma = 1000;}
               case 1:{izabranasuma = 2000;}
case 2:{izabranasuma = 3000;}
               case 3:{izabranasuma = 4000;}
               case 4:{izabranasuma = 5000;}
case 5:{izabranasuma = 10000;}
               case 6:{izabranasuma = 20000;}
               case 7:{izabranasuma = 30000;}
case 8:{izabranasuma = 40000;}
               case 9:{izabranasuma = 50000;}
               case 10:{izabranasuma = 100000;}
case 11://unesi iznos
{
ShowPlayerDialog(playerid,2004,DIALOG_STYLE_INPUT,"Banka","Upisite vrijednost koju zelite da stavite u banku.","Deposit","Odustani");
return 1;
}

           }
new cashdeposit = izabranasuma;
if (cashdeposit > GetPlayerMoney(playerid))
{
GameTextForPlayer(playerid, "~w~Nemate toliko~n~~r~Novca!!!", 3000, 1);
return 1;
}
SafeGivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
SendClientMessage(playerid, COLOR_WHITE, "|___ IZJAVA BANKE ___|");
format(string, sizeof(string), "  Staro Stanje: $%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "  Deposit: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
format(string, sizeof(string), "  Novo Stanje: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_WHITE, string);
ShowPlayerDialog(playerid,2001,DIALOG_STYLE_LIST,"Banka","1.000$\n2.000$\n3.000$\n4.000$\n5.000$\n10.000$\n20.000$\n30.000$\n40.000$\n50.000$\n100.000$\nUnesi Iznos","Deposit","Zatvori");
}
else
{
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST ,"Banka","Deposit\nWithdraw\nKredit\nBalance","Odaberi","Odustani");
}
return 1;
   }
   if(dialogid == 2002)//withdraw
   {
       if(response)
       {
           new izabranasuma;
           switch(listitem)
           {
               case 0:{izabranasuma = 1000;}
               case 1:{izabranasuma = 2000;}
case 2:{izabranasuma = 3000;}
               case 3:{izabranasuma = 4000;}
               case 4:{izabranasuma = 5000;}
case 5:{izabranasuma = 10000;}
               case 6:{izabranasuma = 20000;}
               case 7:{izabranasuma = 30000;}
case 8:{izabranasuma = 40000;}
               case 9:{izabranasuma = 50000;}
               case 10:{izabranasuma = 100000;}
case 11://unesi iznos
{
ShowPlayerDialog(playerid,2005,DIALOG_STYLE_INPUT,"Banka","Upisite vrijednost koju zelite da podignete.","Withdraw","Odustani");
return 1;
}

           }
           new cashdeposit = izabranasuma;
if (cashdeposit > PlayerInfo[playerid][pAccount])
{
GameTextForPlayer(playerid, "~w~Nemate toliko~n~~r~Novca Na Racunu!", 3000, 1);
return 1;
}
SafeGivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "  Uzeli ste $%d sa vaseg racuna, Ukupno: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
ShowPlayerDialog(playerid,2002,DIALOG_STYLE_LIST,"Banka","1.000$\n2.000$\n3.000$\n4.000$\n5.000$\n10.000$\n20.000$\n30.000$\n40.000$\n50.000$\n100.000$\nUnesi Iznos","Withdraw","Zatvori");
       }
else
{
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST ,"Banka","Deposit\nWithdraw\nKredit\nBalance","Odaberi","Odustani");
}
       return 1;
   }
   if(dialogid == 2003)
   {
if(response)
{
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST ,"Banka","Deposit\nWithdraw\nKredit\nBalance","Odaberi","Odustani");
}

return 1;
}
if(dialogid == 2004)
{
   if(response)
   {
new cashdeposit = strval(inputtext);
if (cashdeposit > GetPlayerMoney(playerid))
{
GameTextForPlayer(playerid, "~w~Nemate toliko~n~~r~Novca!!!", 3000, 1);
return 1;
}
SafeGivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
SendClientMessage(playerid, COLOR_WHITE, "|___ IZJAVA BANKE ___|");
format(string, sizeof(string), "  Staro Stanje: $%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "  Deposit: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
format(string, sizeof(string), "  Novo Stanje: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_WHITE, string);
ShowPlayerDialog(playerid,2001,DIALOG_STYLE_LIST,"Banka","1.000$\n2.000$\n3.000$\n4.000$\n5.000$\n10.000$\n20.000$\n30.000$\n40.000$\n50.000$\n100.000$\nUnesi Iznos","Deposit","Zatvori");
   }
else
{
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST ,"Banka","Deposit\nWithdraw\nKredit\nBalance","Odaberi","Odustani");
}
}
if(dialogid == 2005)
{
   if(response)
   {
           new cashdeposit = strval(inputtext);
if (cashdeposit > PlayerInfo[playerid][pAccount])
{
GameTextForPlayer(playerid, "~w~Nemate toliko~n~~r~Novca Na Racunu!", 3000, 1);
return 1;
}
SafeGivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "  Uzeli ste $%d sa vaseg racuna, Ukupno: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
ShowPlayerDialog(playerid,2002,DIALOG_STYLE_LIST,"Banka","1.000$\n2.000$\n3.000$\n4.000$\n5.000$\n10.000$\n20.000$\n30.000$\n40.000$\n50.000$\n100.000$\nUnesi Iznos","Withdraw","Zatvori");
   }
else
{
ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST ,"Banka","Deposit\nWithdraw\nKredit\nBalance","Odaberi","Odustani");
}
}
Poslednja Izmena: Avgust 23, 2011, 12:39:09 POSLE PODNE od [CH] ..Nikola..

Vidi moj dialog pa si svoj editaj :)

case DIALOG_WITHDRAW:
{
    if(response)
{
new
    bMsg[112],
    oldBank;
   
    oldBank = PlayerInfo[playerid][pAccount];
   
    if(strval(inputtext) >= PlayerInfo[playerid][pAccount])
    {
        SCM(playerid, COLOR_WHITE, "Nemate dovoljno novca na svom racunu!");
        return 1;
    }

PlayerInfo[playerid][pAccount] -= strval(inputtext);
GivePlayerCash(playerid, strval(inputtext));

    format(bMsg, sizeof(bMsg), "Stari iznos na racunu: $%i\nNovi iznos na racunu: $%i\n\nPodigli ste $%i sa bankovnog racuna.", oldBank, PlayerInfo[playerid][pAccount], strval(inputtext));
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Los Santos Banka - Informacije", bMsg, "U redu", "");
}
}
Aequam memento rebus in arduis servare mentem.