Код:
timer severTimers2[1000](){
foreach(Player, i){
if(IsPlayerConnectedEx(i)){
if(Info[i][pTimePayDay] >= 0)
{
Info[i][pTimePayDay]++;
if(Info[i][pTimePayDay] >= 3600)
{
if(Info[i][p_Pr_Time] == 10)
{
SendClientMessageEx(i, COLOR_WHITE, "* Ya puedes volver hacer viajes de camionero.");
Info[i][p_Pr_Time] = 0;
}
if(Info[i][pRenting] != INVALID_HOUSE_ID)
{
if(Info[i][pNrCuenta] != 0)
{
if(HouseInfo[Info[i][pRenting]][hRentFee] > Info[i][pMoneyBank])
{
Info[i][pRenting] = INVALID_HOUSE_ID;
SendClientMessageEx(i, COLOR_WHITE, "* Fuiste desalojado de la casa que rentabas.");
}
else
{
Info[i][pMoneyBank] -= HouseInfo[Info[i][pRenting]][hRentFee];
fbank -= HouseInfo[Info[i][pRenting]][hRentFee];
}
}
else GivePlayerCash(i, -HouseInfo[Info[i][pRenting]][hRentFee]);
HouseInfo[Info[i][pRenting]][hSafeMoney] += HouseInfo[Info[i][pRenting]][hRentFee];
format(szMessage, sizeof(szMessage), "* Has pagado $%d de la renta de la casa donde estбs alquilando.", HouseInfo[Info[i][pRenting]][hRentFee]);
SendClientMessageEx(i, COLOR_GRAD2, szMessage);
}
Info[i][pRob] = 0;
if(Info[i][pDobleExp] == 0){Info[i][pExp] += 1;}
else
{
Info[i][pExp] += 2;
Info[i][pDobleExp]--;
format(szMessage, sizeof(szMessage), "* Ganaste 2 puntos de respeto por tener horas de doble experiencia, te quedan %d horas mбs.", Info[i][pDobleExp]);
SendClientMessageEx(i, COLOR_YELLOW, szMessage);
}
//Sueldos
Info[i][pMipaga] = 0;
Info[i][pMipagaa] = 0;
SendClientMessageEx(i, COLOR_WHITE, "* FACTURA DEL ESTADO SAN ANDREAS *");
if(Info[i][pBorrowedMoney] != 0)
{ // pFeesBank pBorrowedMoneyT
SendClientMessageEx(i, COLOR_YELLOW, "- DEUDA AL BANCO DE LOS SANTOS:");
new pay = (Info[i][pBorrowedMoney] / Info[i][pFeesBank]);
format(szMessage, sizeof(szMessage)," Dueda al banco: "#COL_RED"$%d"#COL_WHITE" | Cuotas : %d | Interйs: "#COL_GREEN"$20", Info[i][pBorrowedMoney],Info[i][pFeesBank]);
SendClientMessageEx(i, COLOR_WHITE, szMessage);
format(szMessage, sizeof(szMessage), " Saldo anterior: $%d | "COL_WHITE"Pago Total : -$%d (Deuda + Interйs)" ,Info[i][pMoneyBank],pay+20);
SendClientMessageEx(i, COLOR_WHITE, szMessage);
Info[i][pMoneyBank] -= pay+20;
Info[i][pBorrowedMoney] -= pay;
Info[i][pFeesBank]--;
format(szMessage, sizeof(szMessage)," Dueda actual: "#COL_RED"$%d"#COL_WHITE" | Cuotas : %d | Interйs:"#COL_GREEN" $20 | "COL_WHITE"Saldo actual: $%d", Info[i][pBorrowedMoney],Info[i][pFeesBank],Info[i][pMoneyBank]);
SendClientMessageEx(i, COLOR_WHITE, szMessage);
SendClientMessageEx(i, COLOR_YELLOW, "- TRANSACCIУN CERRADA");
}
SendClientMessageEx(i, COLOR_YELLOW, "- IMPUESTOS:");
format(szMessage, sizeof(szMessage), " Pago de impuestos: "#COL_RED"-$%d", TaxValue);
SendClientMessageEx(i, COLOR_WHITE, szMessage);
if(Info[i][pNrCuenta] != 0)
{
if(Info[i][pMoneyBank] > TaxValue)
{
format(szMessage, sizeof(szMessage), " Saldo anterior: "#COL_RED"$%d",Info[i][pMoneyBank]);
SendClientMessageEx(i, COLOR_WHITE, szMessage);
if(Info[i][pGunLic] == 1)
{
SendClientMessageEx(i, COLOR_WHITE, " Pago por adquisiciуn de licencia de armas: "#COL_GREEN"$55");
Info[i][pMoneyBank] -= 55;
fbank -= 55;
Tax += 55;
}
Info[i][pMoneyBank] -= TaxValue;
fbank -= TaxValue;
Tax += TaxValue;
format(szMessage, sizeof(szMessage), "Saldo actual: "#COL_GREEN"$%d",Info[i][pMoneyBank]);
SendClientMessageEx(i, COLOR_WHITE, szMessage);
}
else
{
if(Info[i][pGunLic] == 1)
{
SendClientMessageEx(i, COLOR_WHITE, " Pago por adquisiciуn de licencia de armas: "#COL_RED"$55 "#COL_WHITE"(Pendiente)");
Tax += 55;
fbank -= 55;
Info[i][pMoneyBank] -= 55;
}
Tax += TaxValue;
fbank -= TaxValue;
Info[i][pMoneyBank] -= TaxValue;
format(szMessage, sizeof(szMessage), " El banco pagу los impuestos por ti y ahora debes al banco.");
SendClientMessageEx(i, COLOR_WHITE, szMessage);
format(szMessage, sizeof(szMessage), " Saldo actual: $%d",Info[i][pMoneyBank]);
SendClientMessageEx(i, COLOR_WHITE, szMessage);
}
}
else
{
if(Info[i][pGunLic] == 1)
{
SendClientMessageEx(i, COLOR_WHITE, "Pago por adquisiciуn de licencia de armas: "#COL_RED"$55 "#COL_WHITE"(Pendiente)");
Info[i][pTaxDeuda] += 55;
}
Info[i][pTaxDeuda] += TaxValue;
SendClientMessageEx(i, COLOR_WHITE, "No tienes una cuenta bancaria, por lo tanto estбs debiendo dinero al estado.");
SendClientMessageEx(i, COLOR_WHITE, "Cuando quieras sacar una tarjeta deberбs pagar lo que debes al banco.");
}
SendClientMessageEx(i, COLOR_YELLOW, "- TRANSACCIУN CERRADA");
SendClientMessageEx(i, COLOR_WHITE, "{000000}============================{FFFFFF} Atenciуn - Anuncio del Banco Central {000000}==========================");
SendClientMessageEx(i, COLOR_WHITE, "Ya se comenzaron a entregar los sueldos, porfavor presentarse en el banco entre los prуximos "#COL_RED"30 minutos. ");
SendClientMessageEx(i, COLOR_WHITE, "{000000}=====================================================================================");
Info[i][pTimePayDay] = 0;
Info[i][pConnectTime] += 1;
GameTextForPlayer(i, "~y~1h+~n~~w~de juego", 5000, 1);
if(Info[i][pConnectTime] == 2)
{
Info[i][pWRestricted] = 0;
SendClientMessageEx(i, COLOR_GRAD2, "SERVER: Cumpliste las 2 horas de juego, la restricciуn de armas fue eliminada");
}
if(Info[i][pAdiccion] > 0) Info[i][pAdiccion] -= 2;
if(Info[i][pWRestricted] > 0)
{
Info[i][pWRestricted]--;
if(Info[i][pWRestricted] == 0) SendClientMessageEx(i, COLOR_LIGHTRED, "SERVER: Tus armas ya no estбn restringidas!");
}
}
}
if(GetPlayerPing(i) > MAX_PING)
{
format(szMessage, sizeof(szMessage), "[ADMINISTRACIУN] >"#COL_WHITE" %s ha sido kickeado por tener %d de ping "#COL_RED"(mбximo: %d).", GetPlayerNameEx(i), GetPlayerPing(i), MAX_PING);
ABroadCast(ROJO_ADMIN, szMessage, 2);
SendClientMessageEx(i, COLOR_YELLOW, "Atenciуn: Has sido expulsado por tener el PING muy elevado.");
Expulsar(i);
}
if(Info[i][pJudgeJailType] != 0 && Info[i][pJudgeJailTime] > 0 && !Info[i][pBeingSentenced]) Info[i][pJudgeJailTime]--;
if(Info[i][pJudgeJailTime] <= 0 && Info[i][pJudgeJailType] != 0) Info[i][pJudgeJailType] = 0;
if(IsaRent[i] > 0)
{
if(RentTime[i] > 0){RentTime[i]--;}
if(RentTime[i] == 0)
{
RentTime[i] = 0;
if(IsaRent[i] == 1)
{
IsaRent[i] = 0;
new newcar = GetPlayerVehicleID(i);
if(IsARentCar(newcar))
{
SetVehicleToRespawn(HireKey[i]);
TogglePlayerControllable(i, 1);
}
}
}
}
if(CommandSpamUnmute[i] == 0){ CommandSpamTimes[i] = 0;}
if(Info[i][pADTime] != 0){Info[i][pADTime]--;}
if(Info[i][pServiceTime] != 0) { Info[i][pServiceTime]--; }
if(Info[i][pSavedTime] != 0) { Info[i][pSavedTime]--; }
if(VIPTimer[i] > 0){ VIPTimer[i]--; }
if(GetPlayerCash(i) != GetPlayerMoney(i)){
ResetMoneyBar(i);
UpdateMoneyBar(i,GetPVarInt(i, "Cash"));
}
if(Info[i][pTriageTime] != 0){Info[i][pTriageTime]--;}
if(Info[i][pRMuted] > 1)
{
if(Info[i][pRMutedTime] > 0){Info[i][pRMutedTime]--;}
else{Info[i][pRMuted] = 0;}
}
if(Info[i][pJailed] > 0){
if(Info[i][pJailTime] > 0){
Info[i][pJailTime]--;
new str[128];
switch(Info[i][pJailed])
{
case 1, 4: format(str, sizeof(str), "~n~~n~~n~~n~~n~~n~~n~ ~r~Jail OOC!~n~~w~%d segundos (%i minutos) restantes", Info[i][pJailTime], Info[i][pJailTime]/60);
case 2, 3, 5, 6: format(str, sizeof(str), "~n~~n~~n~~n~~n~~n~~n~ ~r~En prision!~n~~w~%d segundos (%i minutos) restantes", Info[i][pJailTime], Info[i][pJailTime]/60);
}
GameTextForPlayer(i, str, 2000, 3);
}
if(Info[i][pJailTime] <= 0)
{
Info[i][pJailTime] = 0;
switch(Info[i][pJailed])
{
case 2:{
SetPosEx(i,1605.5861,-1646.6277,13.5469,0,0,0);
Info[i][pWantedLevel] = 0;
SetPlayerWantedLevel(i, Info[i][pWantedLevel]);
}
case 3:{
SetPlayerInterior(i, 0);
Info[i][pInt] = 0;
SetPlayerVirtualWorld(i, 0);
Info[i][pVW] = 0;
SetPlayerPos(i,343.1081,-1521.4404,33.2985);
}
case 1,4:{
SetPlayerInterior(i, 0);
Info[i][pInt] = 0;
SetPosEx(i,1552.8286,-1674.9845,16.1953,0,0,0);
}
case 5:{
SetPlayerInterior(i, 0);
Info[i][pInt] = 0;
SetPlayerVirtualWorld(i, 0);
Info[i][pVW] = 0;
SetPlayerPos(i,130.0132,1945.5618,19.3507);
}
case 6:{
SetPlayerInterior(i, 0);
Info[i][pInt] = 0;
SetPlayerVirtualWorld(i, 0);
Info[i][pVW] = 0;
SetPlayerPos(i,614.4990,-585.9028,17.2266);
}
case 1000:{
SetPlayerInterior(i, 0);
Info[i][pInt] = 0;
SetPosEx(i,1552.8286,-1674.9845,16.1953,0,0,0);
}
}
Info[i][pJailed] = 0;
PhoneOnline[i] = 0;
SendClientMessageEx(i, COLOR_GREEN,"Has cumplido tu condena.");
GameTextForPlayer(i, "~g~Eres Libre~n~~w~Se mejor persona.", 5000, 1);
SetPlayerSkin(i, Info[i][pChar]);
SetPlayerToTeamColor(i);
}
}
if(Info[i][pWantedLevel] > 0){SetPlayerWantedLevel(i, Info[i][pWantedLevel]);}
if(UsedFind[i] >= 1){ UsedFind[i]--; }
if(JustReported[i] != 0){ JustReported[i]--; }
if(NewbieTimer[i] != 0){ NewbieTimer[i]--; }
if(Info[i][pDudaMute] != 0){ Info[i][pDudaMute]--; }
if(PlayerTazeTime[i] != 0)
{
PlayerTazeTime[i] += 1;
if(PlayerTazeTime[i] == 15){PlayerTazeTime[i] = 0;}
}
if(MechanicCallTime[i] > 0)
{
if(MechanicCallTime[i] == 60) { MechanicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~Checkpoint eliminado!", 2500, 1); }
else
{
new string[5];
format(string, sizeof(string), "%d", 30 - MechanicCallTime[i]);
GameTextForPlayer(i, string, 1500, 6);
MechanicCallTime[i] += 1;
}
}
if(MedicCallTime[i] > 0)
{
if(MedicCallTime[i] == 45) { MedicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~Checkpoint eliminado!", 2500, 1); }
else
{
new string[5];
format(string, sizeof(string), "%d", 45 - MedicCallTime[i]);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(MedicAccepted[i], X, Y, Z);
SetPlayerCheckpoint(i, X, Y, Z, 5);
GameTextForPlayer(i, string, 1500, 6);
MedicCallTime[i] += 1;
}
}
if(EMSCallTime[i] > 0)
{
if(EMSAccepted[i] < 999)
{
if(IsPlayerConnectedEx(EMSAccepted[i]))
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(EMSAccepted[i], X, Y, Z);
SetPlayerCheckpoint(i, X, Y, Z, 5);
}
}
}
if(Info[i][pEstado] == 1){
if(PlayerCuffedTime[i] <= 0){
//Frozen[i] = 0;
SetPVarInt(i, "IsFrozen", 0);
TogglePlayerControllable(i, 1);
Info[i][pEstado] = 0;
SetPVarInt(i, "PlayerCuffed", 0);
PlayerCuffedTime[i] = 0;
PlayerTazeTime[i] = 1;
ClearAnimations(i);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X, Y, Z);
SetPlayerPos(i, X, Y, Z);
}
else{
PlayerCuffedTime[i] -= 1;
}
}
if(Info[i][pEstado] == 2){
if(PlayerCuffedTime[i] <= 0){
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X, Y, Z);
new copinrange;
foreach(Player, j){
if(IsPlayerInRangeOfPoint(j, 30, X, Y, Z) && IsACop(j)){copinrange = 1;}
}
if(copinrange == 0)
{
//Frozen[i] = 0;
SetPVarInt(i, "IsFrozen", 0);
GameTextForPlayer(i, "~r~Rompiste las esposas eres libre!", 2500, 3);
TogglePlayerControllable(i, 1);
SetPlayerSpecialAction(i, 0);
Info[i][pEstado] = 0;
DeletePVar(i, "PlayerCuffed");
PlayerCuffedTime[i] = 0;
}
else{PlayerCuffedTime[i] = 60;}
}
else{PlayerCuffedTime[i] -= 1;}
}
if(PlayerDrunk[i] > 9)
{
if(PlayerDrunkTime[i] > 20)
{
ApplyAnimation(i,"PED", "WALK_DRUNK",6.0,0,1,0,0,PlayerDrunk[i]*1000);
SetPlayerDrunkLevel(i, PlayerDrunk[i]*1000);
PlayerDrunk[i] -= 1;
PlayerDrunkTime[i] = 0;
}
PlayerDrunkTime[i] += 1;
}
if(PlayerDrunk[i] < 10 && PlayerDrunk[i] > 0)
{
if(PlayerDrunkTime[i] > 30)
{
PlayerDrunk[i] -= 1;
PlayerDrunkTime[i] = 0;
}
PlayerDrunkTime[i] += 1;
}
}
}
}
"Divide by zero" How hard can it fucking be to understand this...