CMD:banco(playerid, params[]) { if(PlayerToPoint(1.5, playerid,330.7844,129.2914,1007.9657)) { Controle(playerid, 0); ShowPlayerDialog(playerid,DIALOG_CAIXA_ELETRONICO, DIALOG_STYLE_LIST,"Banco","Saque\nDeposito\nSaldo\ nTransferir","Ok","Cancelar"); } else if(GetPlayerCaixa(playerid)) { if(CaixaInfo[GetPlayerCaixa(playerid)][Caixa_Roubada]) return SendClientMessage(playerid, COLOR_GRAD1, " Este caixa eletronico foi roubado por assaltantes recentemente."); ShowPlayerDialog(playerid, DIALOG_CAIXA_ELETRONICO,DIALOG_STYLE_LIST,"Caixa Eletrфnico","Saque\nDeposito\nSaldo\nTransferir\n{ 21DD00}ROUBAR","Confirmar", "Cancelar"); } return 1; } CMD:transferir(playerid, params[]) { if(PlayerInfo[playerid][pConnectTime] < 2) { SendClientMessage(playerid,COLOR_GRAD2," Vocк sу transferir com 2 horas jogadas no servidor!"); return true; } if(!PlayerToPoint(9.5,playerid,330.7844,129.2914,1 007.9657))//PlayerToPoint(1.0,playerid,1929.5409,-1785.1664,13.5469) { SendClientMessage(playerid, COLOR_GREY, "Voce nгo esta no banco"); return true; } if(sscanf(params, "ud", giveplayerid, moneys)) { SendClientMessage(playerid, COLOR_GRAD1, "/transferir [ID do Player] [quantidade]"); return true; } new string[128]; if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { new PlayerIP[128]; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerIp(playerid,PlayerIP, sizeof(PlayerIP)); playerdinheiro = PlayerInfo[playerid][pConta] ; if (moneys > 0 && playerdinheiro >= moneys) { if(PlayerInfo[giveplayerid][pConta] >= 1000000000) { SendClientMessage(playerid, COLOR_GRAD1, "Este jogador tem mais de 1kkk em sua conta, transferкncia invalida."); return true; } if(!gPlayerLogged[giveplayerid]) { SendClientMessage(playerid, COLOR_GRAD1, "Este jogador ainda nгo logou."); return true; } PlayerInfo[playerid][pConta] -= moneys; PlayerInfo[giveplayerid][pConta] += moneys; format(string, sizeof(string), " Vocк transferiu $%d para a conta bancбria de %s [ID %d]", moneys, giveplayer,giveplayerid); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_GRAD1, string); format(string, sizeof(string), " Vocк recebeu $%d em sua conta bancбria, Nome do depositante: %s [ID %d]", moneys, sendername, playerid); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "[%s] %s Transferiu R$%d para %s.", PlayerIP,sendername, moneys, giveplayer); ABroadCast(COLOR_YELLOW,string,1); printf("%s", string); BPSLogs("transferencias", string); PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, COLOR_GRAD1, "Transferкncia Invalida!"); } } } else { format(string, sizeof(string), "[ID]%d Nгo estб ativo.", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } return true; } |
if(dialogid == DIALOG_CAIXA_ELETRONICO_INPUT) { if(response == 0) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0);CaixaEl etronico_Ok[playerid] = 0;return true; } if(response >= 1) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); if(CaixaEletronico_Ok[playerid] != 3) { if(CaixaEletronico_Ok[playerid] == 1) { ForT ![]() } else if(CaixaEletronico_Ok[playerid] == 2) { if (strval(inputtext) > GetPlayerMoney(playerid) || strval(inputtext) < 1) { CaixaEletronico_Ok[playerid] = 0; SendClientMessage(playerid, COLOR_GRAD2, " Voce nгo tem tudo isso em suas mгos!"); return true; } GiveDinheiro(playerid,-strval(inputtext)); new curfunds = PlayerInfo[playerid][pConta]; PlayerInfo[playerid][pConta]=strval(inputtext)+PlayerInfo[playerid][pConta]; SendClientMessage(playerid, COLOR_WHITE, "|___| BANCO INFO |___|"); format(string, sizeof(string), " Saldo: R$%d", curfunds); SendClientMessage(playerid, COLOR_GRAD2, string); format(string, sizeof(string), " Deposito: R$%d",strval(inputtext)); SendClientMessage(playerid, COLOR_GRAD4, string); SendClientMessage(playerid, COLOR_GRAD6, "|_______________________|"); format(string, sizeof(string), " Novo Saldo: R$%d", PlayerInfo[playerid][pConta]); SendClientMessage(playerid, COLOR_WHITE, string); } else if(CaixaEletronico_Ok[playerid] == 4) { if (IsPlayerConnected(TransferenciaID[playerid])) { if(TransferenciaID[playerid] != INVALID_PLAYER_ID) { if (strval(inputtext) > 0 && PlayerInfo[playerid][pConta] >= strval(inputtext)) { new Valor = strval(inputtext); if(strval(inputtext) > 500000)return SendClientMessage(playerid, COLOR_GRAD1, "Para transferir uma quantia grande, vб a um banco."); PlayerInfo[playerid][pConta] -= strval(inputtext); PlayerInfo[TransferenciaID[playerid]][pConta] += strval(inputtext); new PlayerIP[128]; new antigo = PlayerInfo[playerid][pConta]; new antigo2 = PlayerInfo[TransferenciaID[playerid]][pConta]; GetPlayerIp(playerid,PlayerIP, sizeof(PlayerIP)); SendClientMessage(playerid, COLOR_GREEN, "|******* Comprovante de Tranferencia ******|"); format(string,sizeof(string),"Saldo Anterior: %d",antigo); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string),"Novo Saldo: %d",PlayerInfo[playerid][pConta]); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string),"Nome do Favorecido: %s",NomePlayer(TransferenciaID[playerid])); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string),"Quantidade Transferida: %d",Valor); SendClientMessage(playerid,COLOR_YELLOW,string); SendClientMessage(playerid, COLOR_GREEN, "|******************************************|" ); SendClientMessage(TransferenciaID[playerid], COLOR_GREEN, "|******* Tranferencia Recebida ******|"); format(string,sizeof(string),"Saldo Anterior: %d",antigo2); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); format(string,sizeof(string),"Novo Saldo: %d",PlayerInfo[TransferenciaID[playerid]][pConta]); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); format(string,sizeof(string),"Nome do Depositante: %s",NomePlayer(TransferenciaID[playerid])); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); format(string,sizeof(string),"Quantidade Transferida: %d",Valor); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); SendClientMessage(TransferenciaID[playerid], COLOR_GREEN, "|******************************************|" ); format(string, sizeof(string), " Vocк transferiu $%d para a conta bancбria de %s [ID: %d].", strval(inputtext), PlayerName(TransferenciaID[playerid]),TransferenciaID[playerid]); PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_GRAD1, string); format(string, sizeof(string), " Vocк recebeu $%d em sua conta bancбria, Nome do depositante: %s [ID: %d].", strval(inputtext), PlayerName(playerid), playerid); SendClientMessage(TransferenciaID[playerid], COLOR_LIGHTBLUE, string); format(string, sizeof(string), "[%s] %s transferiu R$%d para %s.",PlayerIP, PlayerName(playerid), strval(inputtext), PlayerName(TransferenciaID[playerid])); ABroadCast(COLOR_YELLOW,string,1); printf("%s", string); BPSLogs("pay", string); PlayerPlaySound(TransferenciaID[playerid], 1052, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, COLOR_GRAD1, " Transferencia Invalida!"); } } } else { format(string, sizeof(string), " %d Nгo esta ativo", TransferenciaID[playerid]); SendClientMessage(playerid, COLOR_GRAD1, string); } } } CaixaEletronico_Ok[playerid] = 0; return true; } return true; } if(dialogid == DIALOG_TRANSFERIR) { if(response == 0) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); CaixaEletronico_Ok[playerid] = 0; return true; } if(response >= 1) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); if(CaixaEletronico_Ok[playerid] == 4) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); TransferenciaID[playerid] = strval(inputtext); ShowPlayerDialog(playerid, DIALOG_CAIXA_ELETRONICO_INPUT, DIALOG_STYLE_INPUT, " Transferкncia","Digite a Quantia que Deseja Transferir:", "Confirma", "Sair"); } return true; } return true; } |
if(dialogid == DIALOG_CAIXA_ELETRONICO_INPUT) { if(response == 0) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0);CaixaEl etronico_Ok[playerid] = 0; TogglePlayerControllable(playerid, 1); return true; } if(response >= 1) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); if(CaixaEletronico_Ok[playerid] != 3) { if(CaixaEletronico_Ok[playerid] == 1) { ForTacar(playerid, inputtext); } else if(CaixaEletronico_Ok[playerid] == 2) { if (strval(inputtext) > GetPlayerMoney(playerid) || strval(inputtext) < 1) { CaixaEletronico_Ok[playerid] = 0; SendClientMessage(playerid, COLOR_GRAD2, " Voce nгo tem tudo isso em suas mгos!"); TogglePlayerControllable(playerid, 1); return true; } GiveDinheiro(playerid,-strval(inputtext)); new curfunds = PlayerInfo[playerid][pConta]; PlayerInfo[playerid][pConta]=strval(inputtext)+PlayerInfo[playerid][pConta]; SendClientMessage(playerid, COLOR_WHITE, "|___| BANCO INFO |___|"); format(string, sizeof(string), " Saldo: R$%d", curfunds); SendClientMessage(playerid, COLOR_GRAD2, string); format(string, sizeof(string), " Deposito: R$%d",strval(inputtext)); SendClientMessage(playerid, COLOR_GRAD4, string); SendClientMessage(playerid, COLOR_GRAD6, "|_______________________|"); format(string, sizeof(string), " Novo Saldo: R$%d", PlayerInfo[playerid][pConta]); SendClientMessage(playerid, COLOR_WHITE, string); } else if(CaixaEletronico_Ok[playerid] == 4) { if (IsPlayerConnected(TransferenciaID[playerid])) { if(TransferenciaID[playerid] != INVALID_PLAYER_ID) { if (strval(inputtext) > 0 && PlayerInfo[playerid][pConta] >= strval(inputtext)) { new Valor = strval(inputtext); if(strval(inputtext) > 500000)return SendClientMessage(playerid, COLOR_GRAD1, "Para transferir uma quantia grande, vб a um banco."); PlayerInfo[playerid][pConta] -= strval(inputtext); PlayerInfo[TransferenciaID[playerid]][pConta] += strval(inputtext); new PlayerIP[128]; new antigo = PlayerInfo[playerid][pConta]; new antigo2 = PlayerInfo[TransferenciaID[playerid]][pConta]; GetPlayerIp(playerid,PlayerIP, sizeof(PlayerIP)); SendClientMessage(playerid, COLOR_GREEN, "|******* Comprovante de Tranferencia ******|"); format(string,sizeof(string),"Saldo Anterior: %d",antigo); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string),"Novo Saldo: %d",PlayerInfo[playerid][pConta]); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string),"Nome do Favorecido: %s",NomePlayer(TransferenciaID[playerid])); SendClientMessage(playerid,COLOR_YELLOW,string); format(string,sizeof(string),"Quantidade Transferida: %d",Valor); SendClientMessage(playerid,COLOR_YELLOW,string); SendClientMessage(playerid, COLOR_GREEN, "|******************************************|" ); SendClientMessage(TransferenciaID[playerid], COLOR_GREEN, "|******* Tranferencia Recebida ******|"); format(string,sizeof(string),"Saldo Anterior: %d",antigo2); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); format(string,sizeof(string),"Novo Saldo: %d",PlayerInfo[TransferenciaID[playerid]][pConta]); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); format(string,sizeof(string),"Nome do Depositante: %s",NomePlayer(TransferenciaID[playerid])); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); format(string,sizeof(string),"Quantidade Transferida: %d",Valor); SendClientMessage(TransferenciaID[playerid],COLOR_YELLOW,string); SendClientMessage(TransferenciaID[playerid], COLOR_GREEN, "|******************************************|" ); format(string, sizeof(string), " Vocк transferiu $%d para a conta bancбria de %s [ID: %d].", strval(inputtext), PlayerName(TransferenciaID[playerid]),TransferenciaID[playerid]); PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_GRAD1, string); format(string, sizeof(string), " Vocк recebeu $%d em sua conta bancбria, Nome do depositante: %s [ID: %d].", strval(inputtext), PlayerName(playerid), playerid); SendClientMessage(TransferenciaID[playerid], COLOR_LIGHTBLUE, string); format(string, sizeof(string), "[%s] %s transferiu R$%d para %s.",PlayerIP, PlayerName(playerid), strval(inputtext), PlayerName(TransferenciaID[playerid])); ABroadCast(COLOR_YELLOW,string,1); printf("%s", string); BPSLogs("pay", string); PlayerPlaySound(TransferenciaID[playerid], 1052, 0.0, 0.0, 0.0); TogglePlayerControllable(playerid, 1); } else { SendClientMessage(playerid, COLOR_GRAD1, " Transferencia Invalida!"); } } } else { format(string, sizeof(string), " %d Nгo esta ativo", TransferenciaID[playerid]); SendClientMessage(playerid, COLOR_GRAD1, string); TogglePlayerControllable(playerid, 1); } } } CaixaEletronico_Ok[playerid] = 0; TogglePlayerControllable(playerid, 1); return true; } TogglePlayerControllable(playerid, 1); return true; } if(dialogid == DIALOG_TRANSFERIR) { if(response == 0) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); CaixaEletronico_Ok[playerid] = 0; TogglePlayerControllable(playerid, 1); return true; } if(response >= 1) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); if(CaixaEletronico_Ok[playerid] == 4) { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); TransferenciaID[playerid] = strval(inputtext); ShowPlayerDialog(playerid, DIALOG_CAIXA_ELETRONICO_INPUT, DIALOG_STYLE_INPUT, " Transferкncia","Digite a Quantia que Deseja Transferir:", "Confirma", "Sair"); } return true; } return true; } |