- 0
Problema comanda withdraw la atm
-
Similar Content
-
- 4 answers
- 584 views
-
Comanda /spec
By VAurel,
- 4 answers
- 211 views
-
- 3 replies
- 250 views
-
- 3 replies
- 210 views
-
Problema turf
By Soryn.,
- 2 answers
- 208 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Sprite_RoPlayers
Salut nu inteles cand pun cordonatele la atm unde se afla nu mai merge comanda.
CMD:withdraw(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first."); if(IsPlayerConnected(playerid)) { if(IsAtBank(playerid)) { new money,string[100]; if(sscanf(params, "i", money)) { SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /withdraw [amount]"); format(string, sizeof(string), "You have $%s in your account.", FormatNumber(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; } if(money < 1) return SendClientMessage(playerid, COLOR_GREY, "Invalid amount specified."); if (money > PlayerInfo[playerid][pAccount]) return SendClientMessage(playerid, COLOR_WHITE, "You don't have that amount of money."); ConsumingMoney[playerid] = 1; GivePlayerCash(playerid, money); PlayerInfo[playerid][pAccount] = PlayerInfo[playerid][pAccount] - money; format(string, sizeof(string), "You have withdrawn $%s from your bank account. Your account balance is now $%s.", FormatNumber(money), FormatNumber(PlayerInfo[playerid][pAccount])); SendClientMessage(playerid, COLOR_DCHAT, string); Update(playerid, pBank); Update(playerid, pCashx); return 1; } else return SendClientMessage(playerid, COLOR_WHITE, "You are not at the bank!"); } return 1; }
public IsAtBank(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid, 50.0, 2306.5564,-16.3045,26.7496)) {//BANK LS return 1; } if(IsPlayerInRangeOfPoint(playerid, 50.0, X,Y,Z)) {//SPAWN ATM return 1; } } return 0; }
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.