How to Increase Payday And Goverment Pay Thanks ? -
Samieastwood - 09.08.2013
How to please
Re: How to Increase Payday And Goverment Pay Thanks ? -
PrivatioBoni - 10.08.2013
Give us the payday/government code..
Re: How to Increase Payday And Goverment Pay Thanks ? -
Samieastwood - 10.08.2013
public PayDay()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gPlayerLogged[i] == 1)
{
if(PlayerInfo[i][pAllowedPayday] >= 5)
{
new wstring[256];
new randcheck = 1299 + random(3799);
new interest = (PlayerInfo[i][pBank]/1000)*(intrate);
new bonus = PlayerInfo[i][pPayCheck];
new newbank = PlayerInfo[i][pBank] + interest;
new randtax = 20 + random(50);
SendClientMessage(i,COLOR_RED,"|__________________ __PayDay____________________|");
format(wstring, sizeof(wstring), "~y~PayDay~n~~w~Paycheck: ~g~%d",randcheck + bonus);
GameTextForPlayer(i, wstring, 5000, 1);
format(wstring, sizeof(wstring), "PayCheck: $%d, Bonus: $%d", randcheck, bonus);
SendClientMessage(i,COLOR_WHITE, wstring);
format(wstring, sizeof(wstring), "Balance: $%d, Interest Gained: $%d, New Balance: $%d,", PlayerInfo[i][pBank], interest, newbank);
format(wstring, sizeof(wstring), "Interest Rate: 0.%d percent", intrate);
SendClientMessage(i,COLOR_WHITE, wstring);
format(wstring, sizeof(wstring), "Government Taxes: $%d", randtax);
SendClientMessage(i,COLOR_WHITE, wstring);
PlayerInfo[i][pBank] += interest;
PlayerInfo[i][pBank] -= randtax;
PlayerInfo[i][pBank] += randcheck + bonus;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pAllowedPayday] = 0;
PlayerInfo[i][pExp]++;
PlayerInfo[i][pPlayingHours] += 1;
SendClientMessage(i,COLOR_RED,"___________________ _____________________________");
new nxtlevel = PlayerInfo[i][pLevel]+1;
new expamount = nxtlevel*levelexp;
if(PlayerInfo[i][pExp] < expamount)
{
format(wstring, sizeof(wstring), "%d/%d experience needed to level up, you currently have %d", expamount,expamount,PlayerInfo[i][pExp]);
SendClientMessage(i,COLOR_WHITE, wstring);
}
else
{
format(wstring, sizeof(wstring), "Level up! - New Level: %d", nxtlevel);
SendClientMessage(i,COLOR_WHITE, wstring);
PlayerInfo[i][pLevel]++;
PlayerInfo[i][pExp] = 0;
}
}
else
{
SendClientMessage(i,COLOR_WHITE,"[Info] Payday not received, not played long enough");
}
}
else
{
SendClientMessage(i,COLOR_WHITE,"[Info] You are not logged in, payday not received");
}
}
}
}