06.06.2012, 15:32
How I change Payday for Player Get 600 USD in one hour I need explain how To Do I't
what I need To Change
Say if something is missing I will Add I't
what I need To Change
PHP Code:
public PayDay()
{
new string[128];
new account,interest;
new rent = 0;
foreach(Player, i)
{
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
if( PlayerInfo[i][pJailed] < 1 && !IsACop(i))
{
format(string,sizeof(string),"You're failing to pay your debt of $%d - now the police are on the look out for you.",GetPlayerCash(i));
SendClientMessage(i, COLOR_LIGHTRED, string);
if(PlayerInfo[i][pWantedLevel] < 6) PlayerInfo[i][pWantedLevel] += 1;
PlayerInfo[i][pCrimes] += 1;
SetPlayerWantedLevel(i, PlayerInfo[i][pWantedLevel]);
}
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
new key = PlayerInfo[i][pPhousekey];
if(key != INVALID_HOUSE_ID)
{
rent = HouseInfo[key][hRentFee];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerCash(i))
{
PlayerInfo[i][pPhousekey] = INVALID_HOUSE_ID;
SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
rent = 0;
}
HouseInfo[key][hSafeMoney] = HouseInfo[key][hSafeMoney]+rent;
}
new tmpintrate, factionpay, faretax;
if (key != INVALID_HOUSE_ID && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+2; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 2; }
else { tmpintrate = 1; }
}
if(PlayerInfo[i][pLevel] <= 5) SendClientMessage(i,COLOR_LIGHTBLUE,"Need to travel somewhere and don't have wheels? Use '/service taxi' to call a cab!");
if(PlayerInfo[i][pPayDay] >= 5)
{
if(GetPVarInt(i, "AdvisorDuty") == 1)
{
PlayerInfo[i][pDutyHours]++;
}
if(PlayerVehicleInfo[i][0][pvWaitForRelease] != 0)
{
PlayerVehicleInfo[i][0][pvWaitForRelease] = 0;
}
if(PlayerVehicleInfo[i][1][pvWaitForRelease] != 0)
{
PlayerVehicleInfo[i][1][pvWaitForRelease] = 0;
}
if(PlayerVehicleInfo[i][2][pvWaitForRelease] != 0)
{
PlayerVehicleInfo[i][2][pvWaitForRelease] = 0;
}
if(PlayerVehicleInfo[i][3][pvWaitForRelease] != 0)
{
PlayerVehicleInfo[i][3][pvWaitForRelease] = 0;
}
if(PlayerVehicleInfo[i][4][pvWaitForRelease] != 0)
{
PlayerVehicleInfo[i][4][pvWaitForRelease] = 0;
}
if(PlayerInfo[i][pDonateRank] > 0)
{
new bonus = PlayerInfo[i][pPayCheck] / 2;
PlayerInfo[i][pPayCheck] += bonus;
}
rent = 0;
faretax = 0;
new checks = PlayerInfo[i][pPayCheck];
if(PlayerInfo[i][pTaxiLicense] == 1) faretax = (checks/100)*5;
new Taxable = (( checks / 100 ) * TaxValue);
PlayerInfo[i][pAccount] -= Taxable + faretax;
Tax += Taxable + faretax;
new ebill;
if (PlayerInfo[i][pLevel] < 21) ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
else ebill = ((PlayerInfo[i][pAccount]/10000)*21);
GivePlayerCash(i, checks);
if(PlayerInfo[i][pAccount] > 0)
{
PlayerInfo[i][pAccount] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
/* auto pay system - EXEMPT THE HITMEN!!1 */
if(PlayerInfo[i][pMember] != 0 && PlayerInfo[i][pMember] != 8)
{
switch(PlayerInfo[i][pRank])
{
case 0: factionpay = FactionPay[PlayerInfo[i][pMember]-1][Rank0];
case 1: factionpay = FactionPay[PlayerInfo[i][pMember]-1][Rank1];
case 2: factionpay = FactionPay[PlayerInfo[i][pMember]-1][Rank2];
case 3: factionpay = FactionPay[PlayerInfo[i][pMember]-1][Rank3];
case 4: factionpay = FactionPay[PlayerInfo[i][pMember]-1][Rank4];
case 5: factionpay = FactionPay[PlayerInfo[i][pMember]-1][Rank5];
case 6: factionpay = FactionPay[PlayerInfo[i][pMember]-1][Rank6];
}
if(Tax <= 0)
{
SendClientMessage(i,COLOR_RED,"The government is in debt; no money is available for pay.");
}
else
{
GivePlayerCash(i, factionpay);
Tax -= factionpay;
}
}
/* auto pay system end */
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
PlayerInfo[i][pExp]++;
PlayerInfo[i][pAccount] = account+interest;
SendClientMessage(i, COLOR_WHITE, "________ BANK STATEMENT ________");
format(string, sizeof(string), " Paycheck: $%d | Tax Money: -$%d (%d percent)", checks, Taxable, TaxValue);
SendClientMessage(i, COLOR_GRAD1, string);
if(PlayerInfo[i][pPhousekey] != INVALID_HOUSE_ID || PlayerInfo[i][pPbiskey] != 255)
{
format(string, sizeof(string), " Electricity bill: -$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Balance: $%d | Interest rate: 0.%d percent", account, tmpintrate);
SendClientMessage(i, COLOR_GRAD1, string);
if(PlayerInfo[i][pTaxiLicense] == 1)
{
format(string, sizeof(string), " Taxi licensing fee (5 percent): -$%d",faretax);
SendClientMessage(i, COLOR_GRAD2, string);
}
if(PlayerInfo[i][pMember] != 0 && PlayerInfo[i][pMember] != 8)
{
format(string,sizeof(string)," Government pay: $%d", factionpay);
SendClientMessage(i, COLOR_GRAD2, string);
}
format(string, sizeof(string), " Interest gained: $%d", interest);
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, COLOR_GRAD4, "______________________________________");
format(string, sizeof(string), " New balance: $%d | Rent paid: -$%d", PlayerInfo[i][pAccount],rent);
SendClientMessage(i, COLOR_GRAD5, string);
if(PlayerInfo[i][pDonateRank] == 2)
{
PlayerInfo[i][pTokens] += 3;
SendClientMessage(i, COLOR_YELLOW, "VIP: You have received 3 tokens.");
}
if(PlayerInfo[i][pDonateRank] == 1)
{
PlayerInfo[i][pTokens] += 2;
SendClientMessage(i, COLOR_YELLOW, "VIP: You have received 2 tokens.");
}
format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
GameTextForPlayer(i, string, 5000, 1);
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
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_LIGHTRED, "* You haven't played long enough to obtain a paycheck.");
}
}
}
for (new x=0; x<MAX_POINTS; x++)
{
Points[x][Announced] = 0;
if (Points[x][Vulnerable] > 0)
{
Points[x][Vulnerable]--;
UpdatePoints();
}
if(Points[x][Vulnerable] == 0 && Points[x][Announced] == 1)
{
}
if (Points[x][Vulnerable] == 0 && Points[x][Type] >= 0 && Points[x][Announced] == 0 && Points[x][ClaimerId] == INVALID_PLAYER_ID)
{
format(string, sizeof(string), "", Points[x][Name]);
SendClientMessageToAll(COLOR_YELLOW, string);
//SetPlayerCheckpoint(i, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz], 3);
ReadyToCapture(x);
Points[x][Announced] = 1;
}
}
for (new f = 0; f < MAX_FAMILY; f++)
{
if(FamilyInfo[f][FamilyResetSpawns])
{
UnloadGangVehicles(f);
SendNewFamilyMessage(f, COLOR_YELLOW, "All gang cars have been reset to their main spawns.");
SetTimerEx("LoadGangVehicles", 2000, false, "d", f);
}
}
SaveStuff();
//Checkprop();
return 1;
}