need help with paycheck
#1

Hello, i want to make the paycheck money more rply.

PHP код:
if(TaxValue 0TaxValue 0
PHP код:
PayDay(i) {
    new
        
string[128],
        
interest,
        
year,
        
month,
        
day;
        
    
getdate(yearmonthday);
     if(
PlayerInfo[i][pLevel] > 0) {
        if(
GetPVarType(i"debtMsg")) {
            if(
GetPlayerCash(i) < && PlayerInfo[i][pJailTime] < && !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(iCOLOR_LIGHTREDstring);
            }
            else 
DeletePVar(i"debtMsg");
        }
        if(
<= PlayerInfo[i][pRenting] < sizeof HouseInfo) {
            if(
HouseInfo[PlayerInfo[i][pRenting]][hRentFee] > PlayerInfo[i][pAccount]) {
                
PlayerInfo[i][pRenting] = INVALID_HOUSE_ID;
                
SendClientMessageEx(iCOLOR_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(
SpecTimerAddSpecialToken(i);
            
SendClientMessageEx(iCOLOR_WHITE"________ BANK STATEMENT ________");
            if(
PlayerInfo[i][pNation] == 0)
            {
                
format(stringsizeof(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(stringsizeof(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(iCOLOR_GRAD1string);
            
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
Reply
#2

What is you tax value? it should be something like 0.01 for 1% as example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)