21.09.2017, 19:38
So, i want when the player types /bank and he is not in the interior, it returns the message "You're not at the bank to use this command".
But when the player enters the bank interior (in this case Planning Department at LV) it can use the command.
Here is the code:
But when the player enters the bank interior (in this case Planning Department at LV) it can use the command.
Here is the code:
Код:
CMD:bank( playerid, params[ ] ) { if ( !bAcc{ playerid } ) { if (!IsPlayerInRangeOfPoint(playerid, 5.0, 2093.3892,1162.2319,11.6552)) return SendClientMessage(playerid,0xFFFFFF,"You need to be near the ATM ($ sign) on map."); ShowPlayerDialog( playerid, DIALOG_BANK2, DIALOG_STYLE_MSGBOX, "{FFFFFF}Bank Account", "{FFFFFF}You don't have a bank account yet.\nWould you like to create a bank account?", "Yes", "No" ); return true; } else { if (!IsPlayerInRangeOfPoint(playerid, 5.0, 2093.3892,1162.2319,11.6552)) return SendClientMessage(playerid,0xFFFFFF,"You need to be near the ATM ($ sign) on map."); ShowPlayerDialog( playerid, DIALOG_BANK, DIALOG_STYLE_LIST, "{FFFFFF}Bank Account", "{FFFFFF}Balance\nDeposit\nWithdraw", "Select", "Cancel" ); return true; } }