09.08.2011, 21:47
1. When i go to the bank(it shows the dialog) and after i click "deposit" dialog disappear
in /banka i have this
And other
2. When i try to /uninvite someone, it said "Access Denied" How to remove that and uninvite him?
in /banka i have this
Код:
if(strcmp(cmd, "/banka", true) == 0) { if(IsPlayerConnected(playerid)) { if(!PlayerToPoint(4,playerid,2310.7529,-13.9257,26.7421)) { SendClientMessage(playerid, COLOR_GREY, "Morate biti u banci."); return 1; } ShowPlayerDialog(playerid,2000,DIALOG_STYLE_LIST ,"|° Banka °|","Deposit\nWithdraw\nKredit\nBalance","Odaberi","Odustani"); } return 1; }
Код:
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; } JB_GivePlayerMoney(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; } JB_GivePlayerMoney(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; } JB_GivePlayerMoney(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; } JB_GivePlayerMoney(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"); } }
Код:
//----------------------------------[UNINVITE]------------------------------------------------ if(strcmp(cmd, "/uninvite", true) == 0) { * *if(IsPlayerConnected(playerid)) * *{ tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /uninvite [ID Igraca/Dio Imena]"); return 1; } new para1; para1 = ReturnUser(tmp); if(PlayerInfo[playerid][pLeader] == 1 && PlayerInfo[para1][pMember] != 1) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 2 && PlayerInfo[para1][pMember] != 2) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 3 && PlayerInfo[para1][pMember] != 3) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 4 && PlayerInfo[para1][pMember] != 4) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 5 && PlayerInfo[para1][pMember] != 5) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 6 && PlayerInfo[para1][pMember] != 6) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 7 && PlayerInfo[para1][pMember] != 7) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 8 && PlayerInfo[para1][pMember] != 8) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 9 && PlayerInfo[para1][pMember] != 9) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 10 && PlayerInfo[para1][pMember] != 10) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 11 && PlayerInfo[para1][pMember] != 11) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 12 && PlayerInfo[para1][pMember] != 12) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 13 && PlayerInfo[para1][pMember] != 13) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 14 && PlayerInfo[para1][pMember] != 14) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 15 && PlayerInfo[para1][pMember] != 15) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if(PlayerInfo[playerid][pLeader] == 16 && PlayerInfo[para1][pMember] != 16) { * *SendClientMessage(playerid, COLOR_GRAD2, "Pristup Odbijen!"); return 1; } if (PlayerInfo[playerid][pLeader] >= 1) { * *if(IsPlayerConnected(para1)) * *{ * * * *if(para1 != INVALID_PLAYER_ID) * * * *{ * *if (PlayerInfo[para1][pMember] > 0) * *{ GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); printf("AdmCmd: %s je izbacio %s-a.", sendername, giveplayer); format(string, sizeof(string), "* Izbaceni ste iz organizacije od strane Lidera: %s.", sendername); SendClientMessage(para1, COLOR_WHITE, string); SendClientMessage(para1, COLOR_WHITE, "* Sada ste civil."); * * * * * * * *gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 3; PlayerInfo[para1][pMember] = 0; PlayerInfo[para1][pRank] = 0; PlayerInfo[para1][pChar] = 0; new rand = random(sizeof(CIV)); SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[para1][pModel] = CIV[rand]; MedicBill[para1] = 0; SpawnPlayer(para1); format(string, sizeof(string), " * Izbaceni ste iz organizacije.", giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, " * Niste ovlasteni da koristite tu komadnu(samo lideri!!)!"); } } return 1; }