29.01.2012, 15:43
Hola! me gustarнa saber como hago para que los autos no exploten, sino que se averieen ... es decir que cuando ya tenga un daсo considerable simplemente se apague y no arranque.
Tambien me gustaria saber que cuando el PJ tenga por ejemplo solo un 20 % de vida caiga al suelo y no se pueda poner de pie, es decir que comienze a agonizar.
Como hago para que deacuerdo al dinero en el banco que tenga guardado, en el payday se le sume x cantidad de dinero por los intereses. En el GM esta asi:
Tambien me gustaria saber que cuando el PJ tenga por ejemplo solo un 20 % de vida caiga al suelo y no se pueda poner de pie, es decir que comienze a agonizar.
Como hago para que deacuerdo al dinero en el banco que tenga guardado, en el payday se le sume x cantidad de dinero por los intereses. En el GM esta asi:
pawn Код:
public PayDay()
{
new string[128];
new account;
new interest,rent = 0, key;
PayDayLeft = 60;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
HouseInfo[key][hRentabil] = HouseInfo[key][hRentabil]+rent;
}
new tmpintrate;
Tax += TaxValue;//Should work for every player online
PlayerInfo[i][pAccount] -= TaxValue;
new checks = 500;
account += checks;
interest = (PlayerInfo[i][pAccount]/500)*(tmpintrate);
PlayerInfo[i][pAccount] = account+interest;
new ebill = 20;
if(PlayerInfo[i][pPhousekey] != 999 || PlayerInfo[i][pPbiskey] != 255)
{
PlayerInfo[i][pAccount] -= ebill;
}
else
{
ebill = 0;
}
SendClientMessage(i, COLOR_ASKQ, "|___ Estado Bancario ___|");
format(string, sizeof(string), " Pago: $%d Impuestos: -$%d", checks, TaxValue);
SendClientMessage(i, COLOR_WHITE, string);
if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
format(string, sizeof(string), " Boleta de Electricidad: -$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
}
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), " Gastos totales: $%d", TaxValue + ebill);
SendClientMessage(i, COLOR_GRAD3, string);
format(string, sizeof(string), " Beneficios totales: $%d", checks-ebill-TaxValue);
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, 0xB6B6B6FF, "|--------------------------------------|");
format(string, sizeof(string), " Antiguo Balance: %d$", PlayerInfo[i][pAccount] - checks + ebill + TaxValue);
SendClientMessage(i, 0x00711DFF, string);
format(string, sizeof(string), " Nuevo Balance: %d$", PlayerInfo[i][pAccount]);
SendClientMessage(i, 0x00CC00FF, string);
format(string, sizeof(string), "~h~~g~dia de paga");
GameTextForPlayer(i, string, 5000, 1);
cNicotina[i] = 0; cEnergysil[i] = 0; cSIDA[i] = 0; cCancer[i] = 0; cEpilepsia[i] = 0;
PlayerInfo[i][pRob] = 0;
PlayerInfo[i][pConnectTime] += 1;
PlayerInfo[i][pExp]++;
if(PlayerInfo[i][pContract] > 0){PlayerInfo[i][pContract] --;}
}
}
}
SaveAccounts();
return 1;
}