31.08.2014, 18:02
Hey guys. This is my deposit command:
At the moment It's only letting me deposit at ONE position. How do i make it so that I can deposit at that position Plus these 2:
Код:
CMD:deposit(playerid, params[]) { new string[128], input; if(sscanf(params, "i", input)) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} /deposit [amount]"); if(GetPlayerMoney(playerid) < input) return SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You don't have that much money!"); if(IsPlayerInRangeOfPoint(playerid, 3.0, 290.2423, 1895.1035, 499.2859)) { pOldBalance[playerid] = pInfo[playerid][BankMoney]; // save old var pInfo[playerid][BankMoney] += input, GivePlayerMoney(playerid, -input); format(string, sizeof(string), "SERVER:{FFFFFF} You have deposited $%d into your bank account.", input); SendClientMessage(playerid, 0x46E850FF, string); format(string, sizeof(string), "SERVER:{FFFFFF} Old balance: $%d | New balance: $%d", pOldBalance[playerid], pInfo[playerid][BankMoney]); SendClientMessage(playerid, 0x46E850FF, string); } else SendClientMessage(playerid, 0x46E850FF, "SERVER:{FFFFFF} You're not near the bank!"); return 1; }
Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0, 280.8637, 1895.0920, 499.2859)) if(IsPlayerInRangeOfPoint(playerid, 3.0, 285.8258, 1895.0934, 499.2859))