SA-MP Forums Archive
[Problema] Payday se le da a algunos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Problema] Payday se le da a algunos (/showthread.php?tid=243536)



[Problema] Payday se le da a algunos - El Bardo - 23.03.2011

Tengo otro problema de esos que surgen de un dнa para el otro.
En este caso, es el PayDay (RolePlay, GodFather) que solo se lo da a algunos jugadores y a otros no.
Estuve comparandolo con otros PayDay's de anteriores versiones del servidor, pero tampoco me ha funcionado.

Les dejo el Public Payday para los mбs experimentados, toda ayuda es bienvenida.
pawn Код:
public PayDay()
{
    new string[128];
    new account,interest;
    new rent = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][pLevel] > 0)
            {
                if(MoneyMessage[i]==1)
                {
                    SendClientMessage(i, COLOR_LIGHTRED, "Usted fallo en pagar su deuda, estara uno segundos en la Carcel.");
                    GameTextForPlayer(i, "~r~Atrapado!", 2000, 1);
                    SetPlayerInterior(i, 6);
                    PlayerInfo[i][pInt] = 6;
                    SetPlayerPos(i, 264.6288,77.5742,1001.0391);
                    PlayerInfo[i][pJailed] = 1;
                    SafeResetPlayerWeapons(i);
                    //SafeResetPlayerMoney(i);
                    WantedPoints[i] = 0;
                    PlayerInfo[i][pJailTime] = 60;
                    format(string, sizeof(string), "Usted es encarcelado por %d segundos.   Fianza: Deuda con el Estado", PlayerInfo[i][pJailTime]);
                    SendClientMessage(i, COLOR_WHITE, string);
                    MoneyMessage[i]=0;
                }
                new playername2[MAX_PLAYER_NAME];
                GetPlayerName(i, playername2, sizeof(playername2));
                account = PlayerInfo[i][pAccount];
                new key = PlayerInfo[i][pPhousekey];
                if(key != 255)
                {
                    rent = HouseInfo[key][hRent];
                    if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
                    {
                        rent = 0;
                    }
                    else if(rent > GetPlayerMoney(i))
                    {
                        PlayerInfo[i][pPhousekey] = 255;
                        SendClientMessage(i, COLOR_WHITE, "Usted ha sido denunciado.");
                        rent = 0;
                    }
                    HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
                }
                new tmpintrate;
                if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
                {
                    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 4; }
                    else { tmpintrate = 2; }//HouseInfo[key][hLevel]
                }
                else
                {
                    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
                    else { tmpintrate = 1; }
                }
                if(PlayerInfo[i][pPayDay] >= 5)
                {
                    TaxValue = 0;
                    PlayerInfo[i][pAccount] -= TaxValue;
                    new checks = PlayerInfo[i][pPayCheck] / 5;
                    if(PlayerInfo[i][pDonateRank] > 0)
                    {
                        new bonus = PlayerInfo[i][pPayCheck] / 10;
                        checks += bonus;
                    }
                    new ebill = 500;
                    //ConsumingMoney[i] = 1;
                    //SafeGivePlayerMoney(i, checks);
                    account += checks;
                    if(PlayerInfo[i][pAccount] > 0)
                    {
                        PlayerInfo[i][pAccount] -= ebill;
                        SBizzInfo[4][sbTill] += ebill;
                    }
                    else
                    {
                        ebill = 0;
                    }
                    interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
                    PlayerInfo[i][pExp]++;
                    PlayerPlayMusic(i);
                    PlayerInfo[i][pAccount] = account+interest;
                    SendClientMessage(i, TEAM_GROVE_COLOR, "|________ ESTADO BANCARIO ________|");
                    format(string, sizeof(string), "  Pago: $%d   Impuestos: -0", checks, TaxValue);
                    SendClientMessage(i, COLOR_WHITE, string);
                    if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                    {
                        format(string, sizeof(string), "Boleta de Electricidad: -$%d", ebill);
                        SendClientMessage(i, COLOR_GRAD1, string);
                    }
                    format(string, sizeof(string), "  Antiguo Balance: $%d", account - checks);
                    SendClientMessage(i, COLOR_WHITE, string);
                    format(string, sizeof(string), "  Tasa de Intereses: 0.%d porciento",tmpintrate);
                    SendClientMessage(i, COLOR_WHITE, string);
                    format(string, sizeof(string), "  Interes Ganado $%d", interest);
                    SendClientMessage(i, COLOR_WHITE, string);
                    SendClientMessage(i, TEAM_GROVE_COLOR, "|--------------------------------------------|");
                    format(string, sizeof(string), "  Nuevo Balance: $%d", PlayerInfo[i][pAccount]);
                    SendClientMessage(i, COLOR_WHITE, string);
                    format(string, sizeof(string), "  Rentas: -$%d", rent);
                    SendClientMessage(i, COLOR_WHITE, string);
                    format(string, sizeof(string), "~w~Paga ~r~horaria");
                    GameTextForPlayer(i, string, 5000, 1);
                    if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
                    {
        format(string, sizeof(string), "- Salario Laboral PFA: $200");
                    SendClientMessage(i, COLOR_DBLUE, string);
                    PlayerInfo[i][pAccount] += 200;
                    }
                        if(PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4)
                    {
        format(string, sizeof(string), "- Salario Laboral MEDICO: $200");
                    SendClientMessage(i, COLOR_DBLUE, string);
                    PlayerInfo[i][pAccount] += 200;
                    }
                    if(PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2)
                    {
        format(string, sizeof(string), "- Salario Laboral FBI: $200");
                    SendClientMessage(i, COLOR_DBLUE, string);
                    PlayerInfo[i][pAccount] += 200;
                    }
                                        if(PlayerInfo[i][pMember] == 3 || PlayerInfo[i][pLeader] == 3)
                    {
        format(string, sizeof(string), "- Salario Laboral Ejercito Nacional: $200");
                    SendClientMessage(i, COLOR_DBLUE, string);
                    PlayerInfo[i][pAccount] += 200;
                    }
                                        if(PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pLeader] == 9)
                    {
           if(PlayerInfo[i][pLeader] == 9)
                          {
              format(string, sizeof(string), "- Salario Laboral del Dueсo de la CNN: $300");
                          SendClientMessage(i, COLOR_YELLOW, string);
                          PlayerInfo[i][pAccount] += 300;
                          }
           if(PlayerInfo[i][pMember] == 9)
                          {
                format(string, sizeof(string), "- Salario Laboral de la CNN: $200");
                               SendClientMessage(i, COLOR_YELLOW, string);
                               PlayerInfo[i][pAccount] += 200;
                          }
                    }
                    if(PlayerInfo[i][pMember] == 7 || PlayerInfo[i][pLeader] == 7)
                    {
           if(PlayerInfo[i][pLeader] == 7)
                          {
              format(string, sizeof(string), "- Salario Laboral Alcalde: $400");
                          SendClientMessage(i, COLOR_YELLOW, string);
                          PlayerInfo[i][pAccount] += 400;
                          }
           if(PlayerInfo[i][pMember] == 7)
                          {
                               if(PlayerInfo[i][pRank] == 1)
                               {
                format(string, sizeof(string), "- Salario Laboral del Gobierno: $250");
                               SendClientMessage(i, COLOR_YELLOW, string);
                               PlayerInfo[i][pAccount] += 250;
                               }
                          }
                    }
                    rent = 0;
                    PlayerInfo[i][pPayDay] = 0;
                    PlayerInfo[i][pPayCheck] = 180 * 5;
                    PlayerInfo[i][pConnectTime] += 1;
                    PlayerInfo[i][pRobo247] = 0;
                    TimeAfterBankJob = 0;
                    timesrobbed[i]=0;
                   
                    if(FarmerVar[i] == 0)
                    {
                        FarmerPickup[i][0] = 0;
                    }
                    if(DrugFarmerVar[i] == 0)
                    {
                        DrugFarmerPickup[i][0] = 0;
                    }
                    if(SmugglerWork[i] == 0)
                    {
                        PayDaySecure[i] = 0;
                    }
                    if(PlayerInfo[i][pDonateRank] > 0)
                    {
                        PlayerInfo[i][pPayDayHad] += 1;
                        if(PlayerInfo[i][pPayDayHad] >= 5)
                        {
                            PlayerInfo[i][pExp]++;
                            PlayerInfo[i][pPayDayHad] = 0;
                        }
                    }
                }
                else
                {
                    SendClientMessage(i, COLOR_WHITE, "* No has jugado el tiempo necesario para obtener un payday.");
                }
                PlayerInfo[i][pRobo247] = 0;
                TimeAfterBankJob = 0;
            }
        }
    }
    SaveAccounts();
    Checkprop();
                        new hour;
              gettime(hour);
           FixHour(hour);
                    hour = shifthour;
                    SetWorldTime(hour);
    return 1;
}



Respuesta: [Problema] Payday se le da a algunos - MaRcOsWeB - 23.03.2011

pawn Код:
if(PlayerInfo[i][pPayDay] >= 5)
"PayDay" >= 5
Cambialo a 0 y te va a pagar a todos.


Respuesta: [Problema] Payday se le da a algunos - El Bardo - 23.03.2011

Nop, el
pawn Код:
if(PlayerInfo[i][pPayDay] >= 5)
Ya venia con el GM default, y como dije arriba, fue un problema de un dia al otro.
Gracias por su respuesta.


Respuesta: [Problema] Payday se le da a algunos - MaRcOsWeB - 23.03.2011

Lo que me referia, es que seguro no les paga porque si no tienen el tiempo necesario online, no se les habilita para cobrarlo, revisarй nuevamente el cуdigo a ver si puedo encontrar otro tipo de "error"


Respuesta: [Problema] Payday se le da a algunos - El Bardo - 23.03.2011

ROLF, esto es increible, el PayDay comenzу a funcionar correctamente de nuevo, ni p*** idea que ha sucedido.
Muchas gracias por tu respuesta.