09.01.2011, 14:01
Tipo galera, no payday do meu gm os preзos de salarios e juros sгo baixos, tipo 10k, no maximo uns 100k!
Queria saber como almenta isso, eu queria colocar tipo no maximo 3kkk de juros para quem tem Juros 0.5, etc!
Acho que oque precisa й desse codigo:
Queria saber como almenta isso, eu queria colocar tipo no maximo 3kkk de juros para quem tem Juros 0.5, etc!
Acho que oque precisa й desse codigo:
pawn Код:
public PayDay()
{
new string[128];
new Conta,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
if(MoneyMessage[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "Voce nao pagou sua divida e foi preso.");
GameTextForPlayer(i, "~r~Preso!", 2000, 1);
SetPlayerInterior(i, 3);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(string, sizeof(string), "Voce foi preso por %d segundos.", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
Conta = PlayerInfo[i][pConta];
new key = PlayerInfo[i][pPHousekey];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoneyEx(i))
{
PlayerInfo[i][pPHousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "Voce foi expulso(a).");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[i][pVIP] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//casaInfo[key][hLevel]
}
else
{
if(PlayerInfo[i][pVIP] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo[i][pPayDay] >= 5)
{
Tax += TaxValue;//Shorld work for every player online
PlayerInfo[i][pConta] -= TaxValue;
if(PlayerInfo[i][pVIP] == 3)
{
new bonus = PlayerInfo[i][pPayCheck] / 2;
PlayerInfo[i][pPayCheck] += bonus;
}
if(PlayerInfo[i][pVIP] == 4)
{
new bonus = PlayerInfo[i][pPayCheck] / 3;
PlayerInfo[i][pPayCheck] += bonus;
}
new checks = PlayerInfo[i][pPayCheck];
new ebill = (PlayerInfo[i][pConta]/10000)*(PlayerInfo[i][pLevel]);
ConsumingMoney[i] = 1;
GivePlayerMoneyEx(i, checks);
if(PlayerInfo[i][pConta] > 0)
{
PlayerInfo[i][pConta] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo[i][pConta]/1000)*(tmpintrate);
PlayerInfo[i][pExp]++;
PlayerPlayMusic(i);
PlayerInfo[i][pConta] = Conta+interest;
SendClientMessage(i, COLOR_WHITE, "|___ Pagamento ___|");
format(string, sizeof(string), " Salario: R$%d Emposto: -R$%d", checks, TaxValue);
SendClientMessage(i, COLOR_GRAD1, string);
SendClientMessage(i, COLOR_GRAD1, " Medico: R$300");
if(PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
format(string, sizeof(string), " Energia: -R$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Banco: R$%d", Conta);
SendClientMessage(i, COLOR_GRAD1, string);
format(string, sizeof(string), " Juros: 0.%d por cento",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), " Juros R$%d", interest);
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, COLOR_GRAD4, "|--------------------------------------|");
format(string, sizeof(string), " Novo extrato: R$%d", PlayerInfo[i][pConta]);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), " Aluguel: -R$%d", rent);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "~r~-==- ~p~ Salario ~r~ -==-");
GameTextForPlayer(i, string, 5000, 1);
GivePlayerMoneyEx(i,- 300);
rent = 0;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
if(PlayerInfo[i][pVIP] == 3)
{
PlayerInfo[i][pPayDayHad] += 1;
if(PlayerInfo[i][pPayDayHad] >= 5)
{
PlayerInfo[i][pExp]++;
PlayerInfo[i][pPayDayHad] = 0;
}
}
if(PlayerInfo[i][pVIP] == 4)
{
PlayerInfo[i][pPayDayHad] += 2;
if(PlayerInfo[i][pPayDayHad] >= 6)
{
PlayerInfo[i][pExp]++;
PlayerInfo[i][pPayDayHad] = 0;
}
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* Voce nгo jogou tempo suficiente para receber salбrio!.");
}
}
}
}
Checkprop();
format(string, sizeof(string), "Loteria: Ja comecou a loteria.");
OOCOff(COLOR_WHITE, string);
new rand = random(80);
if(rand < 77) { rand += 3; }
Lotto(rand);
return 1;
}