19.10.2015, 12:47
(
Последний раз редактировалось norton2; 19.10.2015 в 14:26.
Причина: ....
)
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.
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;
}