20.07.2011, 20:54
when i go in game and select this case its show me the dialog but when i try to put something like number is not work i press enter and dialog is hide and then nothing happen help me!
Код:
case 1:{ new string[128]; ShowPlayerDialog(playerid,withdrawm,DIALOG_STYLE_INPUT,"Los Santos Bank: Withdraw Cash","Please But The Ammount Of Money To Withdraw:","Withdraw","Cancel"); new moneystowithdraw = strval(inputtext); if(GetPlayerMoney(playerid) + moneystowithdraw >= 1000001) { SendClientMessage(playerid, 0xA9A9A9AA, "|_Transaction Failed_|"); format(string, sizeof(string), "You cannot fit $%d more in your pockets!",moneystowithdraw); SendClientMessage(playerid, COLOR_ERROR, string); return 1; } new pname[30]; GetPlayerName(playerid,pname,30); if(moneystowithdraw <= 0 || moneystowithdraw >= 2000001) { format(string, sizeof(string), "|_|----- Los Santos City Bank -----|_|"); SendClientMessage(playerid, 0xA9A9A9AA, string); format(string, sizeof(string), "|** Transaction Failed. Min/Max Withdraw amounts reached"); SendClientMessage(playerid,0x808080AA,string); SendClientMessage(playerid,0x808080AA,"Minimum/Maximum amounts are $1 - $2000000"); format(string, sizeof(string), "**(Bank F Transaction)** %s(%d) Has attempted to withdraw $%d from bank account",pname,playerid,moneystowithdraw); printf("%s",string); return 1; } BankCash[playerid] = dUserINT(PlayerName(playerid)).("bankcash"); if(BankCash[playerid] < moneystowithdraw) { format(string, sizeof(string), "|_|----- Los Santos City Bank -----|_|"); SendClientMessage(playerid, 0xA9A9A9AA, string); format(string, sizeof(string), "|** Transaction Failed. You do not have enough money in bank"); SendClientMessage(playerid,0x808080AA,string); format(string, sizeof(string), "**(Bank NEF Transaction** %s(%d) Has attempted to withdraw $%d from bank account",pname,playerid,moneystowithdraw); printf("%s",string); return 1; } if(BankCash[playerid] >= moneystowithdraw) { format(string, sizeof(string), "|_|----- Los Santos City Bank -----|_|"); SendClientMessage(playerid, 0xA9A9A9AA, string); format(string, sizeof(string), "|** Mode: Transaction Reciept (Withdraw)"); SendClientMessage(playerid,0x808080AA,string); format(string, sizeof(string), "|** Transaction Total: $%d",moneystowithdraw); SendClientMessage(playerid,0x808080AA,string); format(string, sizeof(string), "|** Notes: You have withdrawn $%d from your bank account",moneystowithdraw); SendClientMessage(playerid,0x808080AA,string); format(string, sizeof(string), "|** Bank Opening Hours: 8:00 - 21:00"); SendClientMessage(playerid,0x808080AA,string); format(string, sizeof(string), "|** 24h ATM machines. /atmloc"); SendClientMessage(playerid,0x808080AA,string); format(string, sizeof(string), "|_|-------------------------------------------|_|"); SendClientMessage(playerid,0xA9A9A9AA,string); BankCash[playerid] -=moneystowithdraw; GivePlayerMoney(playerid,moneystowithdraw); dUserSetINT(PlayerName(playerid)).("bankcash",BankCash[playerid]); format(string, sizeof(string), "**(Bank Transaction)** %s(%d) Has withdrawn $%d from bank account",pname,playerid,moneystowithdraw); printf("%s",string); } return 1; }