04.03.2012, 17:10
como botar esse cmd em dialog?
na caixinha para depositar
na caixinha para depositar
pawn Код:
CMD:deposit(playerid, params[]) {
new
cash,
string[128];
if(sscanf(params, "d", cash)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/deposit [amount]");
else if(cash <= 0) return SendClientMessage(playerid, COLOR_GREY, "Invalid amount specified.");
else {
if(IsPlayerInRangeOfPoint(playerid, 15.0, 2306.8481,-16.0682,26.7496) && GetPlayerVirtualWorld(playerid) == 2) {
if(playerVariables[playerid][pMoney] < cash) SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for this transaction.");
else if(cash >= 1) {
playerVariables[playerid][pBankMoney] += cash;
playerVariables[playerid][pMoney] -= cash;
format(string, sizeof(string), "You have deposited $%d into your bank account. Your account balance is now $%d.", cash, playerVariables[playerid][pBankMoney]);
SendClientMessage(playerid, COLOR_DCHAT, string);
}
else SendClientMessage(playerid, COLOR_GREY, "Invalid amount specified.");
}
else {
SendClientMessage(playerid, COLOR_GREY, "You're not at the bank.");
}
}
return 1;
}