need help with paycheck - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: need help with paycheck (
/showthread.php?tid=582274)
need help with paycheck -
IndependentGaming - 19.07.2015
Hello, i want to make the paycheck money more rply.
PHP код:
if(TaxValue < 0) TaxValue = 0;
PHP код:
PayDay(i) {
new
string[128],
interest,
year,
month,
day;
getdate(year, month, day);
if(PlayerInfo[i][pLevel] > 0) {
if(GetPVarType(i, "debtMsg")) {
if(GetPlayerCash(i) < 0 && PlayerInfo[i][pJailTime] < 1 && !IsACop(i) && PlayerInfo[i][pWantedLevel] < 6) {
format(string,sizeof(string),"You're in debt $%s - find a way to pay back the money or you might get in trouble!", number_format(GetPlayerCash(i)));
SendClientMessageEx(i, COLOR_LIGHTRED, string);
}
else DeletePVar(i, "debtMsg");
}
if(0 <= PlayerInfo[i][pRenting] < sizeof HouseInfo) {
if(HouseInfo[PlayerInfo[i][pRenting]][hRentFee] > PlayerInfo[i][pAccount]) {
PlayerInfo[i][pRenting] = INVALID_HOUSE_ID;
SendClientMessageEx(i, COLOR_WHITE, "You have been evicted from your residence for failing to pay rent fees.");
}
else {
HouseInfo[PlayerInfo[i][pRenting]][hSafeMoney] += HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
PlayerInfo[i][pAccount] -= HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
}
}
if(PlayerInfo[i][pConnectSeconds] >= 3600) {
if(GetPVarType(i, "AdvisorDuty")) {
PlayerInfo[i][pDutyHours]++;
}
if(SpecTimer) AddSpecialToken(i);
SendClientMessageEx(i, COLOR_WHITE, "________ BANK STATEMENT ________");
if(PlayerInfo[i][pNation] == 0)
{
format(string, sizeof(string), " Paycheck: $%s | SA Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 200) * TaxValue), TaxValue);
PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 200) * TaxValue;
Tax += (PlayerInfo[i][pPayCheck] / 200) * TaxValue;
}
else if(PlayerInfo[i][pNation] == 1)
{
format(string, sizeof(string), " Paycheck: $%s | TR Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 200) * TRTaxValue), TRTaxValue);
PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 200) * TRTaxValue;
TRTax += (PlayerInfo[i][pPayCheck] / 200) * TRTaxValue;
}
SendClientMessageEx(i, COLOR_GRAD1, string);
interest = (PlayerInfo[i][pAccount] + 1) / 1000;
How can i do that if i change the
PHP код:
Tax += (PlayerInfo[i][pPayCheck] / 200) * TaxValue;
its not normal / 100 but when i put it down to 10 i get still to much and if i put it on 200 i get still to much
AW: need help with paycheck -
BigBrainAFK - 19.07.2015
What is you tax value? it should be something like 0.01 for 1% as example.