[Help] change PayDay/Paycheck
#1

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

PHP Code:
public PayDay()
{
    new 
string[128];
    new 
account,interest;
    new 
rent 0;
     foreach(
Playeri)
    {
            if(
PlayerInfo[i][pLevel] > 0)
            {
                if(
MoneyMessage[i]==1)
                {
                    if( 
PlayerInfo[i][pJailed] < && !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(iCOLOR_LIGHTREDstring);
                        if(
PlayerInfo[i][pWantedLevel] < 6PlayerInfo[i][pWantedLevel] += 1;
                        
PlayerInfo[i][pCrimes] += 1;
                        
SetPlayerWantedLevel(iPlayerInfo[i][pWantedLevel]);
                    }
                }
                new 
playername2[MAX_PLAYER_NAME];
                
GetPlayerName(iplayername2sizeof(playername2));
                
account PlayerInfo[i][pAccount];
                new 
key PlayerInfo[i][pPhousekey];
                if(
key != INVALID_HOUSE_ID)
                {
                    
rent HouseInfo[key][hRentFee];
                    if(
strcmp(playername2HouseInfo[key][hOwner], true) == 0)
                    {
                        
rent 0;
                    }
                    else if(
rent GetPlayerCash(i))
                    {
                        
PlayerInfo[i][pPhousekey] = INVALID_HOUSE_ID;
                        
SendClientMessage(iCOLOR_WHITE"You have been evicted.");
                        
rent 0;
                    }
                    
HouseInfo[key][hSafeMoney] = HouseInfo[key][hSafeMoney]+rent;
                }
                new 
tmpintratefactionpayfaretax;
                if (
key != INVALID_HOUSE_ID && strcmp(playername2HouseInfo[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] <= 5SendClientMessage(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] == 1faretax = (checks/100)*5;
                    new 
Taxable = (( checks 100 ) * TaxValue);
                    
PlayerInfo[i][pAccount] -= Taxable faretax;
                    
Tax += Taxable faretax;
                    new 
ebill;
                    if (
PlayerInfo[i][pLevel] < 21ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
                    else 
ebill = ((PlayerInfo[i][pAccount]/10000)*21);
                    
GivePlayerCash(ichecks);
                    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] != && PlayerInfo[i][pMember] != 8)
                    {
                        switch(
PlayerInfo[i][pRank])
                        {
                            case 
0factionpay FactionPay[PlayerInfo[i][pMember]-1][Rank0];
                            case 
1factionpay FactionPay[PlayerInfo[i][pMember]-1][Rank1];
                            case 
2factionpay FactionPay[PlayerInfo[i][pMember]-1][Rank2];
                            case 
3factionpay FactionPay[PlayerInfo[i][pMember]-1][Rank3];
                            case 
4factionpay FactionPay[PlayerInfo[i][pMember]-1][Rank4];
                            case 
5factionpay FactionPay[PlayerInfo[i][pMember]-1][Rank5];
                            case 
6factionpay 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(ifactionpay);
                            
Tax -= factionpay;
                        }
                    }
                    
/* auto pay system end */
                    
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
                    
PlayerInfo[i][pExp]++;
                    
PlayerInfo[i][pAccount] = account+interest;
                    
SendClientMessage(iCOLOR_WHITE"________ BANK STATEMENT ________");
                    
format(stringsizeof(string), "  Paycheck: $%d  |  Tax Money: -$%d (%d percent)"checksTaxableTaxValue);
                    
SendClientMessage(iCOLOR_GRAD1string);
                    if(
PlayerInfo[i][pPhousekey] != INVALID_HOUSE_ID || PlayerInfo[i][pPbiskey] != 255)
                    {
                        
format(stringsizeof(string), "  Electricity bill: -$%d"ebill);
                        
SendClientMessage(iCOLOR_GRAD1string);
                    }
                    
format(stringsizeof(string), "  Balance: $%d  |  Interest rate: 0.%d percent"accounttmpintrate);
                    
SendClientMessage(iCOLOR_GRAD1string);
                    if(
PlayerInfo[i][pTaxiLicense] == 1)
                    {
                        
format(stringsizeof(string), "  Taxi licensing fee (5 percent): -$%d",faretax);
                        
SendClientMessage(iCOLOR_GRAD2string);
                    }
                    if(
PlayerInfo[i][pMember] != && PlayerInfo[i][pMember] != 8)
                    {
                        
format(string,sizeof(string),"  Government pay: $%d"factionpay);
                        
SendClientMessage(iCOLOR_GRAD2string);
                    }
                    
format(stringsizeof(string), "  Interest gained: $%d"interest);
                    
SendClientMessage(iCOLOR_GRAD3string);
                    
SendClientMessage(iCOLOR_GRAD4"______________________________________");
                    
format(stringsizeof(string), "  New balance: $%d  |  Rent paid: -$%d"PlayerInfo[i][pAccount],rent);
                    
SendClientMessage(iCOLOR_GRAD5string);
                      if(
PlayerInfo[i][pDonateRank] == 2)
                    {
                        
PlayerInfo[i][pTokens] += 3;
                        
SendClientMessage(iCOLOR_YELLOW"VIP: You have received 3 tokens.");
                    }
                    if(
PlayerInfo[i][pDonateRank] == 1)
                    {
                        
PlayerInfo[i][pTokens] += 2;
                        
SendClientMessage(iCOLOR_YELLOW"VIP: You have received 2 tokens.");
                    }
                    
format(stringsizeof(string), "~y~PayDay~n~~w~Paycheck");
                    
GameTextForPlayer(istring50001);
                    
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(iCOLOR_LIGHTRED"* You haven't played long enough to obtain a paycheck.");
                }
            }
    }
    for (new 
x=0x<MAX_POINTSx++)
    {
        
Points[x][Announced] = 0;
        if (
Points[x][Vulnerable] > 0)
        {
            
Points[x][Vulnerable]--;
            
UpdatePoints();
        }
        if(
Points[x][Vulnerable] == && Points[x][Announced] == 1)
        {
        }
        if (
Points[x][Vulnerable] == && Points[x][Type] >= && Points[x][Announced] == && Points[x][ClaimerId] == INVALID_PLAYER_ID)
        {
            
format(stringsizeof(string), ""Points[x][Name]);
            
SendClientMessageToAll(COLOR_YELLOWstring);
            
//SetPlayerCheckpoint(i, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz], 3);
            
ReadyToCapture(x);
            
Points[x][Announced] = 1;
        }
    }
    for (new 
0MAX_FAMILYf++)
    {
        if(
FamilyInfo[f][FamilyResetSpawns])
        {
            
UnloadGangVehicles(f);
            
SendNewFamilyMessage(fCOLOR_YELLOW"All gang cars have been reset to their main spawns.");
            
SetTimerEx("LoadGangVehicles"2000false"d"f);
        }
    }
    
SaveStuff();
    
//Checkprop();
    
return 1;

Say if something is missing I will Add I't
Reply
#2

UP I Need Help
Reply
#3

Don't bump.
Reply
#4

Change the value's of
pawn Code:
account
interest
it must be @ top just search it.
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)