21.12.2012, 22:41 
	
	
	
		Hello.
What is going on? I just made my first tax formula and SA-MP doesn't detect the wanted level...
My wanted level will be always taken as 0.
What this means is that we get 0+random(1000) always.
eg. (0*53732) + 782 = 0+782 = 782
How do I make it so Pawno will detect the wantedlevel?
I really need the wanted level.... please help... THANKS!!!!
	
	
	
What is going on? I just made my first tax formula and SA-MP doesn't detect the wanted level...
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	//=============[SETDEFAULT]=============//
	SetPlayerWantedLevel(playerid, 0);
	//================[TAX]================//
	new string[128];
	new wantedlevel; wantedlevel = GetPlayerWantedLevel(playerid);
	new moneyamount; moneyamount = GetPlayerMoney(playerid);
	new tax;
	
	if(moneyamount < 0) { tax = (wantedlevel*((9/10)*-moneyamount))/5-random(1000); } //so you dont get on + with the money
	if(moneyamount > 0) { tax = (wantedlevel*((9/10)*moneyamount))/5+random(1000); }
 	format(string, sizeof string, "Your total tax was %d$.", tax);
  	SendClientMessage(playerid, COLOR_ACHIEVEMENT, string);
  	GivePlayerMoney(playerid, -tax);
	return 1;
}
What this means is that we get 0+random(1000) always.
eg. (0*53732) + 782 = 0+782 = 782
How do I make it so Pawno will detect the wantedlevel?
I really need the wanted level.... please help... THANKS!!!!


