//----------------------------------[cajero System]----------------------------------------------- if(strcmp(cmd, "/sacar", true) == 0) { if(PlayerToPoint(8, playerid, -1982.2592,198.6211,27.6875) || IsPlayerConnected(playerid)) { if(!IsAtATM(playerid) || !SFAtATM(playerid)) { SendClientMessage(playerid, COLOR_GREY, "Puedes hacer el proseso en el banco de SF."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "COMANDO: /sacar [Cantidad]"); format(string, sizeof(string), " Tienes $%d en tu cuenta.", PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new cashdeposit = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /sacar [Cantidad]"); format(string, sizeof(string), " Tienes $%d en tu cuenta.", PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1) { SendClientMessage(playerid, COLOR_GRAD2, " No tienes esa Cantidad"); return 1; } //ConsumingMoney[playerid] = 1; SafeGivePlayerMoney(playerid,cashdeposit); PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit; format(string, sizeof(string), " Has extraido $%d de tu Cuenta. Te Quedan: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_YELLOW, string); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s Realiza una Tranzaccion en su cuenta bancaria.", sendername); TextDrawShowForPlayer(playerid, BalanceTextDraw[playerid] ); BizzInfo[9][bTill] -= cashdeposit; return 1; } return 1; } if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/depositar", true) == 0) { if(IsPlayerConnected(playerid)) { if(!IsAtATM(playerid) || !SFAtATM(playerid)) { SendClientMessage(playerid, COLOR_GREY, " Puedes hacer el proseso en el banco de SF."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "COMANDO: /bank [Cantidad]"); format(string, sizeof(string), " Tienes $%d en tu Cuenta.", PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new cashdeposit = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "COMANDO: /bank [Cantidad]"); format(string, sizeof(string), " Tienes $%d en tu Cuenta.", PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1) { SendClientMessage(playerid, COLOR_GRAD2, " No tienes esa Cantidad"); return 1; } SafeGivePlayerMoney(playerid,-cashdeposit); new curfunds = PlayerInfo[playerid][pAccount]; PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount]; SendClientMessage(playerid, COLOR_WHITE, "|____________ CUENTA BANCARIA ____________|"); format(string, sizeof(string), " Antes Tenias..: $%d", curfunds); SendClientMessage(playerid, COLOR_GRAD2, string); format(string, sizeof(string), " Ingresaste..: $%d",cashdeposit); SendClientMessage(playerid, COLOR_GRAD4, string); SendClientMessage(playerid, COLOR_GRAD6, "|_________________________________________|") ; format(string, sizeof(string), " Ahora Tienes..: $%d", PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_WHITE, string); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s Realiza una Tranzaccion en su cuenta bancaria.", sendername); ProxDetector(12.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); TextDrawShowForPlayer(playerid, BalanceTextDraw[playerid] ); BizzInfo[9][bTill] += cashdeposit; return 1; } return 1; } if(strcmp(cmd, "/saldo", true) == 0) { if(IsPlayerConnected(playerid)) { if(!IsAtATM(playerid)) { SendClientMessage(playerid, COLOR_GREY, " No estas en el Banco!"); return 1; } format(string, sizeof(string), " Tienes $%d en tu Cuenta.",PlayerInfo[playerid][pAccount]); SendClientMessage(playerid, COLOR_YELLOW, string); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s mira su recibo bancario.", sendername); ProxDetector(12.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); } return 1; } |