Money from payday
#1

Hi,
I have this payday(In 1 hour give money to players online)(Script Down) ok.I want the players who are members of Police Department [ if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) ] in every payday to get money 1000$ (INFO: You have got 1000$ for working for PD.)
How can i make that ??


Here is the payday...



PHP код:
                if(PlayerInfo[i][pPayDay] >= 5)
                {
                    
Tax += TaxValue;//Should work for every player online
                    
PlayerInfo[i][pAccount] -= TaxValue;
                    new 
checks PlayerInfo[i][pPayCheck] / 5;
                    if(
PlayerInfo[i][pDonateRank] > 0)
                    {
                        new 
bonus PlayerInfo[i][pPayCheck] / 10;
                        
checks += bonus;
                    }
                    new 
ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
                    
account += checks;
                    if(
PlayerInfo[i][pAccount] > 0)
                    {
                        
PlayerInfo[i][pAccount] -= ebill;
                        
SBizzInfo[4][sbTill] += ebill;
                    }
                    else
                    {
                        
ebill 0;
                    }
                    
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
                    
PlayerInfo[i][pExp]++;
                    
PlayerInfo[i][pAccount] = account+interest;
                    
format(coordstringsizeof(coordstring),  "{FFFFFF}Plata: $%d\n Taksi: -$%d\n"checksTaxValue);
                    if(
PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                    {
                        
format(coordstring1sizeof(coordstring1), "{FFFFFF}Smetka za struja: -$%d\n"ebill);
                    }
                    
format(coordstring2sizeof(coordstring2), "{FFFFFF}Stara smetka: $%d\n"account checks);
                    
format(coordstring3sizeof(coordstring3), "{FFFFFF}Kamata: 0.%d posto\n",tmpintrate);
                    
format(coordstring4sizeof(coordstring4), "{FFFFFF}Interes: $%d\n"interest);
                    
format(coordstring5sizeof(coordstring5), "{FFFFFF}Nova smetka: $%d\n"PlayerInfo[i][pAccount]);
                    
format(coordstring6sizeof(coordstring6), "{FFFFFF}Rent: -$%d\n"rent);
                    
/*format(coordstring7, sizeof(coordstring7), "{FFFFFF}Kredit: $%d\n", PlayerInfo[i][pKredit]);
                    if(PlayerInfo[i][pKredit] != 0)
                    {
                        format(coordstring8, sizeof(coordstring8), "{FFFFFF}Rata: %d\n", PlayerInfo[i][pAccount]);
                        PlayerInfo[i][pKredit] -= 500;
                        PlayerInfo[i][pAccount] -= 500;
                    }*/
                    
format(payday512,"%s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
                    
ShowPlayerDialog(i667DIALOG_STYLE_MSGBOX"Payday | Plata"payday "OK""");
                    
format(stringsizeof(string), "~y~Plata~n~~w~Platata stigna na vasata smetka.");
                    
GameTextForPlayer(istring50001);
                    
rent 0;
                    
PlayerInfo[i][pPayDay] = 0;
                    
PlayerInfo[i][pPayCheck] = 0;
                    
PlayerInfo[i][pConnectTime] += 1;
                    
BankRobbedRecently 0;
                    
BankRobbedRecently1 0;
                    
BankRobbedRecently2 0;
                    
BankRobbedRecently3 0;
                    if(
FarmerVar[i] == 0)
                    {
                        
FarmerPickup[i][0] = 0;
                    }
                }
                else
                {
                    
SendClientMessage(iCOLOR_WHITE"{37F906}INFO:{FFFFFF}Ne igravte dovolno za da dobiete plata.");
                }
            }
    }
    
SaveAccounts();
    return 
1;

Reply


Messages In This Thread
Money from payday - by Vizi - 19.02.2013, 13:24
Re: Money from payday - by Vizi - 19.02.2013, 15:24
Re: Money from payday - by Vizi - 26.02.2013, 14:56
Re: Money from payday - by Vizi - 27.02.2013, 15:40
Re: Money from payday - by teomakedonija - 29.03.2013, 09:56

Forum Jump:


Users browsing this thread: 1 Guest(s)