24.03.2011, 12:21
Hey, I have developed my own tax script, which I have been using for many months now, and I decided I want to step it up.
This is it right now.
Pretty much all that does, is divides the players current cash by 6, and charges them the result in tax.
It's a simple idea, but I want to step it up, I'm thinking of creating a tax-rate in percentage.
Does anyone know if that is possible?
What I mean is that it would be something like 23% of the players current money would be charged.
I know dividing it by four would be equal to 25 %.
Is it possible to do anything like, "GetPlayerMoney(playerid)/23%"
If this is possible I will try and set up a command, "/setrate <percentage>".
If anyone can understand what I'm asking it would be very helpful for an answer.
This is it right now.
pawn Код:
public TaxTimer(playerid)
{
if(GetPlayerMoney(playerid) <= 100) return 0;
new amount = GetPlayerMoney(playerid)/6;
GivePlayerMoney(playerid,-amount);
new str[40];
format(str,sizeof(str),"You have paid $%d in tax",amount);
SendClientMessage(playerid,0xFF0000FF,str);
return 1;
}
It's a simple idea, but I want to step it up, I'm thinking of creating a tax-rate in percentage.
Does anyone know if that is possible?
What I mean is that it would be something like 23% of the players current money would be charged.
I know dividing it by four would be equal to 25 %.
Is it possible to do anything like, "GetPlayerMoney(playerid)/23%"
If this is possible I will try and set up a command, "/setrate <percentage>".
If anyone can understand what I'm asking it would be very helpful for an answer.