25.12.2012, 00:38
I think he means something like when you get unfair death you get your money back..
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
//======[TAX]======//
new string[128],
wantedlevel = GetPlayerWantedLevel(playerid),
moneyamount = GetPlayerMoney(playerid);
if(moneyamount < 0) { moneyamount = moneyamount*-1; }
if(-50000 < moneyamount < -1) { moneyamount = 0; }
new tax; tax = 250+(moneyamount*wantedlevel)/20+random(1000);
format(string, sizeof(string), "Your total tax was %d$.", tax);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
GivePlayerMoney(playerid, -tax);
if(wantedlevel == 0 && gTeam[killerid] == TEAM_POLICE || gTeam[killerid] == TEAM_CIA)
{
tax = 0;
}
//=[SETPLAYERWANTEDLEVEL]=//
SetPlayerWantedLevel(playerid, 0);
return 1;
}