09.05.2011, 21:11
I have a problem with payday.
Every time you must come payday site says "You Have not Played Long Enough to Obtain a Payday" and do not take payday (not passing the hours played / stats).
Please help me.Thanks
Every time you must come payday site says "You Have not Played Long Enough to Obtain a Payday" and do not take payday (not passing the hours played / stats).
Please help me.Thanks
pawn Код:
public PayDay()
{
new string[256];
new account,interest;
new rent = 0;
if(weatherlimit > 0)
{
weatherlimit += 1;
}
if(weatherlimit == 2)
{
weatherlimit = 0;
}
if(lottolimit > 0)
{
lottolimit += 1;
}
if(lottolimit == 6)
{
lottolimit = 0;
}
for (new i=0; i<MAX_POINTS; i++)
{
PWarInfo[i][pwAnnounced] = 0;
if (PWarInfo[i][pwVulnerable] > 0)
{
PWarInfo[i][pwVulnerable]--;
UpdatePWarInfo();
}
}
gangRosterUpdate();
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
cock(i);
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
GameTextForPlayer(i, "~r~Busted!", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerVirtualWorld(i, 2);
PlayerInfo[i][pInt] = 6;
PlayerInfo[i][pLocal] = 6;
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(string, sizeof(string), "You are jailed for %d seconds. Bail: Unable", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
new tmpintrate;
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
if(PlayerInfo[i][pPayDay] >= 1)
{
Tax += TaxValue;
PlayerInfo[i][pAccount] -= TaxValue;
if(PlayerInfo[i][pDonateRank] > 0)
{
new bonus = (PlayerInfo[i][pPayCheck]/100) * 10;
PlayerInfo[i][pPayCheck] += bonus;
}
new checks = PlayerInfo[i][pPayCheck];
new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
new randCheck = 10000 + random(89999);
if(PlayerInfo[i][pAccount] > 0)
{
PlayerInfo[i][pAccount] -= ebill;
}
else
{
ebill = 0;
}
new gangtax;
new taxpercent;
if(PlayerInfo[i][pMember] >= 20 && PlayerInfo[i][pMember] <= 40)
{
for(new g = 0; g < sizeof(GangInfo); g++)
{
if(GangInfo[g][hqGang] == PlayerInfo[i][pMember])
{
if(GangInfo[g][hqTaxBoy] > 0)
{
gangtax = (checks/100) * GangInfo[g][hqTaxBoy];
taxpercent = GangInfo[g][hqTaxBoy];
checks -= gangtax;
}
}
}
}
PlayerPaid[i] = 0;
PlayerRoutingCode[i] = randCheck;
PlayerPayment[i] = checks;
PlayerTribute[i] = gangtax;
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
PlayerPlayMusic(i);
PlayerInfo[i][pAccount] = account+interest;
SendClientMessage(i, COLOR_SACBLUE, "|___ BANK STATMENT ___|");
format(string, sizeof(string), " Paycheck: %s Tax Money: -%s", ConvertToMoney(checks), ConvertToMoney(TaxValue));
SendClientMessage(i, COLOR_GRAD1, string);
if(gangtax > 0)
{
format(string, sizeof(string), " Gang Tribute Set at %d percent: -%s ", taxpercent, ConvertToMoney(gangtax));
SendClientMessage(i, COLOR_GRAD1, string);
}
if(PlayerInfo[i][pPhousekey] != 9999 || PlayerInfo[i][pPbiskey] != 9999)
{
format(string, sizeof(string), " Electricity Bill: -%s", ConvertToMoney(ebill));
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Balance: %s", ConvertToMoney(account));
SendClientMessage(i, COLOR_GRAD1, string);
format(string, sizeof(string), " Interest Rate: 0.%d percent",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), " Interest Gained %s", ConvertToMoney(interest));
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, COLOR_SACBLUE, "|----------------------------------|");
format(string, sizeof(string), " New Balance: %s", ConvertToMoney(PlayerInfo[i][pAccount]));
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), " Rent: -%s", ConvertToMoney(rent));
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
new payment = PlayerPayment[i];
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
PlayerInfo[i][pCash] += payment;
PlayerPaid[i] = 1;
PlayerInfo[i][pExp]++;
if(PlayerInfo[i][pDonateRank] > 0)
{
PlayerInfo[i][pDonateRank] -= 1;
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* You haven't played long enough to obtain a PayDay.");
}
}
}
}
return 1;
}