26.01.2012, 23:52
It still isnt working. This is what im doing:
But to activate that, I used
The menu does load, but when i type something in into the input, nothing happens.
PHP код:
case 3874:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 3892, DIALOG_STYLE_INPUT, "Withdraw", "How much would you like to withdraw?", "Withdraw", "Cancel"); //withdraw
}
case 1:
{
ShowPlayerDialog(playerid, 3893, DIALOG_STYLE_INPUT, "Deposit", "How much would you like to deposit?", "Deposit", "Cancel"); //deposit
}
}
}
case 3892:
{
switch(listitem)
{
case 0:
{
new string[256];
format(string, sizeof(string), "You have withdrawed $%s from your bank account", strlen(inputtext));
if(Player[playerid][BankMoney] >= strlen(inputtext))
{
GivePlayerMoney( playerid, strval( inputtext ) );
Player[playerid][Money] += strlen(inputtext);
Player[playerid][BankMoney] = Player[playerid][BankMoney]-strval(inputtext);
SendClientMessage(playerid, WHITE, string);
}
else
{
SendClientMessage(playerid, WHITE, "You dont have that kind of money!");
}
}
}
}
case 3893:
{
switch(listitem)
{
case 0:
{
new string[256];
format(string, sizeof(string), "You have deposited $%s to your bank account", strlen(inputtext));
if(Player[playerid][Money] >= strlen(inputtext))
{
Player[playerid][Money] -= strlen(inputtext);
Player[playerid][BankMoney] += strlen(inputtext);
SendClientMessage(playerid, WHITE, string);
}
else
{
SendClientMessage(playerid, WHITE, "You dont have that kind of money!");
}
}
}
}
PHP код:
ShowPlayerDialog(playerid, 3874, DIALOG_STYLE_LIST, "ATM", "Withdraw\nDeposit\n", "Select", "Cancel");

