Without money/rp/hours played.
#1

Sometimes players do not have Money/Respect Points/Hours played on the server. For whatever this is happening. R39-2 use MySQL.

So far the players have told me that is the problem after taking payday.
Код HTML:
forward PayDay();
public PayDay()
{
    new string[128], rent = 0;
    foreach (new i : Player)
    {
        if(IsPlayerConnected(i))
        {
            new checks = RandomEx(900, 1201), ebill = 100 + random(99);
            new TaxValue = 1;
            SendClientMessage(i, COLOR_WHITE, "|___ BANK STATMENT ___|");
            format(string, sizeof(string), "{5F5F5F}Paycheck: {FFFFFF}%s | {5F5F5F}Tax Money: {FFFFFF}-%s", FormatNumber(checks), FormatNumber(TaxValue));
            SendClientMessage(i, -1, string);
            if(pInfo[i][pHouse] != 355 || pInfo[i][pBusiness] != 355)
            {
                format(string, sizeof(string), "{5F5F5F}Electricity Bill: {FFFFFF}-%s", FormatNumber(ebill));
                SendClientMessage(i, -1, string);
            }
            format(string, sizeof(string), "{5F5F5F}Rent: {FFFFFF}-%s", FormatNumber(rent));
            SendClientMessage(i, -1, string);
            format(string, sizeof(string), "{5F5F5F}Balance: {FFFFFF}%s", FormatNumber(pInfo[i][pBankMoney]));
            SendClientMessage(i, -1, string);
            SendClientMessage(i, -1, "|--------------------------------------|");
            format(string, sizeof(string), "{5F5F5F}New Balance: {FFFFFF}%s", FormatNumber(pInfo[i][pBankMoney]+=5)); VPUpdate(i, pBankMoneyu);
            SendClientMessage(i, -1, string);
            GameTextForPlayer(i, "~g~~h~PayDay", 5000, 1); GiveMoney(i, checks-1);

            pInfo[i][pHoursPlayed] += 1; VPUpdate(i, pHoursPlayedu);
            pInfo[i][pRPoints] += 1; VPUpdate(i, pRPointsu);
            if(pInfo[i][pRob] < 10 && pInfo[i][pPremium] == 0) { pInfo[i][pRob] += 1; VPUpdate(i, pRobu); }
            if(pInfo[i][pRob] < 20 && pInfo[i][pPremium] == 1) { pInfo[i][pRob] += 1; VPUpdate(i, pRobu); }
            if(pInfo[i][pFPunish] > 0) { pInfo[i][pFPunish] -= 1; VPUpdate(i, pFPunishu); }
            if(pInfo[i][pCarLic] > 0)
            {
                pInfo[i][pCarLicTime] -= 1; VPUpdate(i, pCarLicTimeu);
                if(pInfo[i][pCarLicTime] == 0) { pInfo[i][pCarLic] = 0; VPUpdate(i, pCarLicu); SendClientMessage(i, COLOR_RED, "* Permisul de conducere ti-a expirat!"); }
            }
            if(pInfo[i][pFlyLic] > 0)
            {
                pInfo[i][pFlyLicTime] -= 1; VPUpdate(i, pFlyLicTimeu);
                if(pInfo[i][pFlyLicTime] == 0) { pInfo[i][pFlyLic] = 0; VPUpdate(i, pFlyLicu); SendClientMessage(i, COLOR_RED, "* Licenta de zbor ti-a expirat!"); }
            }
            if(pInfo[i][pBoatLic] > 0)
            {
                pInfo[i][pBoatLicTime] -= 1; VPUpdate(i, pBoatLicTimeu);
                if(pInfo[i][pBoatLicTime] == 0) { pInfo[i][pBoatLic] = 0; VPUpdate(i, pBoatLicu); SendClientMessage(i, COLOR_RED, "* Licenta de navigat ti-a expirat!"); }
            }
            if(pInfo[i][pGunLic] > 0)
            {
                pInfo[i][pGunLicTime] -= 1; VPUpdate(i, pGunLicTimeu);
                if(pInfo[i][pGunLicTime] == 0) { pInfo[i][pGunLic] = 0; VPUpdate(i, pGunLicu); SendClientMessage(i, COLOR_RED, "* Licenta de port-arma ti-a expirat!"); }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
[++REP] Without money/rp/hours played. - by norton2 - 19.10.2015, 12:47
Re: Without money/rp/hours played. - by norton2 - 19.10.2015, 14:26
Re : Without money/rp/hours played. - by StreetRP - 19.10.2015, 14:27
Re: Without money/rp/hours played. - by norton2 - 19.10.2015, 15:01
Re: Without money/rp/hours played. - by norton2 - 19.10.2015, 17:05
Re: Without money/rp/hours played. - by norton2 - 19.10.2015, 19:24
Re: Without money/rp/hours played. - by norton2 - 20.10.2015, 13:03
Re: Without money/rp/hours played. - by SecretBoss - 20.10.2015, 13:11
Re: Without money/rp/hours played. - by norton2 - 20.10.2015, 14:40
Re: Without money/rp/hours played. - by SecretBoss - 20.10.2015, 15:16

Forum Jump:


Users browsing this thread: 3 Guest(s)