zcmd(sacar, playerid, params[]){
if(!gPlayerLogged{playerid}) return SendClientMessageEx(playerid, COLOR_GRAD2, "No estбs logeado!");
if(IsAtATM(playerid)){
new money;
if(sscanf(params, "d", money)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Utiliza: /sacar [cantidad]");
if(money > Info[playerid][pAccount] || money < 1) return SendClientMessageEx(playerid, COLOR_GRAD2, "Cantidad incorrecta");
if(money < 0) return SendClientMessageEx(playerid, COLOR_GREY, "No puedes retirar menos de 0.");
new string[64];
Earn(playerid,money);
Info[playerid][pAccount]-= money+10;
format(string, sizeof(string), " Extrajiste: $%d ($10 Comisiуn) - Nuevo Balance: $%d",money,Info[playerid][pAccount]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s hace una transacciуn bancaria.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
format(string, sizeof(string), "[RETIRO BANCO] - %s hizo un retiro de $%d.", GetPlayerNameEx(playerid), money);
return 1;
} else SendClientMessageEx(playerid, COLOR_GREY, "No estбs en un ATM/Banco!");
return 1;
}
zcmd(depositar, playerid, params[]){
if(!gPlayerLogged{playerid}) return SendClientMessageEx(playerid, COLOR_GRAD2, "No estбs logeado!");
if(IsAtATM(playerid)){
new money;
if (sscanf(params, "d", money)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Utiliza: /depositar [cantidad]");
if (money > GetPlayerCash(playerid) || money < 1) return SendClientMessageEx(playerid, COLOR_GRAD2, "Cantidad incorrecta");
new string[64];
Bought(playerid,money);
Info[playerid][pAccount]+=money+10;
format(string, sizeof(string), " Depositaste: $%d ($10 Comisiуn) - Nuevo Balance: $%d",money,Info[playerid][pAccount]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* %s hace una transacciуn bancaria.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
format(string, sizeof(string), "[DEPOSITO BANCO] - %s hizo un depуsito de $%d.", GetPlayerNameEx(playerid), money);
return 1;
}
else SendClientMessageEx(playerid, COLOR_GREY, "No estбs en un ATM/Banco!");
return 1;
}
zcmd(transferir, playerid, params[]){
new string[128], giveplayerid, money;
if(!IsAtATM(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "No estбs en un ATM/Banco.");
if(!sscanf(params, "dd", giveplayerid, money)){
if(money > Info[playerid][pAccount]) return SendClientMessageEx(playerid, COLOR_GRAD2, "Cantidad incorrecta.");
if(money < 0) return SendClientMessageEx(playerid, COLOR_GREY, "No puedes transferir menos de 0.");
if (IsPlayerConnected(giveplayerid)){
if (GetPVarInt(playerid, "GiveMoneyTimer") > 0){
format(string, sizeof(string), "Tienes que esperar %d segundos despuйs de transferido dinero.", GetPVarInt(playerid, "GiveMoneyTimer"));
SendClientMessageEx(playerid,COLOR_GREY,string);
return 1;
}
SetPVarInt(playerid, "GiveMoneyTimer", 60); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_PAYTIMER);
Info[playerid][pAccount] -= money+10;
Info[giveplayerid][pAccount] += money-10;
format(string, sizeof(string), "* Has echo una transferencia de %d$ a %s", money, GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "* Recibiste una transferencia de %d$ de %s", money, GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_GRAD1, string);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "AdmWarning: %s hizo una transferencia de $%d a %s", GetPlayerNameEx(playerid), money, GetPlayerNameEx(giveplayerid));
ABroadCast(COLOR_YELLOW,string,2);
format(string, sizeof(string), "[TRANSFER BANCO] - %s hizo una transferencia de $%d a %s.", GetPlayerNameEx(playerid), money, GetPlayerNameEx(giveplayerid));
} else SendClientMessageEx(playerid, COLOR_GREY, "Jugador desconectado.");
} else SendClientMessageEx(playerid, COLOR_GREY, "* /transferir <jugador> <cantidad>");
return 1;
}
|