Quote:
Originally Posted by XandyMello
Fernando, serб chamada quando o player ganhar 1 experiencia aparentemente.
Por gentileza, poste a public Payday para eu ter certeza ..
|
PHP код:
forward Payday(playerid);
public Payday(playerid)
{
new hh, mm, ss;
gettime(hh,mm,ss);
if(mm == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
new string[128];
new salario = 400;
new housetax, biztax;
new antigosaldo = PlayerInfo[i][MoneyBank];
PlayerInfo[i][MoneyBank] -= housetax;
PlayerInfo[i][MoneyBank] -= biztax;
PlayerInfo[i][MoneyBank] += salario;
if(PlayerInfo[i][HouseKey] == 1) housetax -= 50;
if(PlayerInfo[i][BusinessKey] == 1) biztax -= 100;
SendClientMessage(i, COLOR_GREEN, "|--------------[PAYDAY]--------------|");
format(string,sizeof(string), "Sбlario: $%d.", salario);
SendClientMessage(i, COLOR_WHITE, string);
format(string,sizeof(string), "Imposto Residкncial: $%d.", housetax);
SendClientMessage(i, COLOR_WHITE, string);
format(string,sizeof(string), "Imposto Empresarial: $%d.", biztax);
SendClientMessage(i, COLOR_WHITE, string);
format(string,sizeof(string), "Antigo saldo bancбrio: $%d.", antigosaldo);
SendClientMessage(i, COLOR_WHITE, string);
format(string,sizeof(string), "Novo saldo bancбrio: $%d.", PlayerInfo[i][MoneyBank]);
SendClientMessage(i, COLOR_WHITE, string);
format(string, sizeof(string), "~r~PayDay! ~n~~g~$%d", PlayerInfo[i][MoneyBank]);
GameTextForPlayer(i, string, 3000, 1);
PlayerInfo[i][Exp] += 1;
ScoreUp(i);
}
}
}
Ah, e se possivel, poderia arrumar uma coisa? Quando eu disconto as taxas de casa e empresa, ele em vez de descontar do salario, nгo, ele manda os 400 dуlares, acho que deve ter me entendido, poderia por favor?