how to set paycheck roleplay? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how to set paycheck roleplay? (
/showthread.php?tid=549885)
how to set paycheck roleplay? -
IndependentGaming - 09.12.2014
Hello, i was trying to set my paycheck rply but i still get above 2000 as level 1 See here
Old one
Код:
if(PlayerInfo[i][pLS] == 0)
{
format(string, sizeof(string), " Paycheck: $%s | SA Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 100) * TaxValue), TaxValue);
PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 100) * TaxValue;
Tax += (PlayerInfo[i][pPayCheck] / 100) * TaxValue;
}
Changed to
Код:
if(PlayerInfo[i][pLS] == 0)
{
format(string, sizeof(string), " Paycheck: $%s | SA Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 1000000) * TaxValue), TaxValue);
PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 1000000) * TaxValue;
Tax += (PlayerInfo[i][pPayCheck] / 1000000) * TaxValue;
}
how to change this rply that you get under 1000 as level 1?
Re: how to set paycheck roleplay? -
Abagail - 09.12.2014
"/" is the operator for division. Here is an example:
new value = 10, tmpval;
tmpval = value / 100;
This would give you 10 since 100 divided by 10 is 10.
Re: how to set paycheck roleplay? -
IndependentGaming - 09.12.2014
So as what do i need to change ? to get the paycheck what i want ?
if i change the 100/ TaxValue to 1000/TaxValue i will get ? for example ?
Re: how to set paycheck roleplay? -
Arastair - 09.12.2014
I suppose you should reset the amount, i mean set the amount for < 1, 2000 or above and set > 1, 1000
Re: how to set paycheck roleplay? -
IndependentGaming - 09.12.2014
i changed it to this
Код:
if(PlayerInfo[i][pLS] == 0)
{
format(string, sizeof(string), " Paycheck: $%s | SA Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 100) * 2000), TaxValue);
PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 100) * 2000;
Tax += (PlayerInfo[i][pPayCheck] / 100) * 2000;
}
This is what i get:
Код:
[17:06:01] ________ BANK STATEMENT ________
[17:06:01] Paycheck: $3,600 | SA Gov Tax: $72,000 (29 percent)
[17:06:01] Balance: $-71,900 | Interest rate: 0.1 percent (50k max)
[17:06:01] Taxi licensing fee (5 percent): $180
[17:06:01] Interest gained: $-36
[17:06:01] ______________________________________
[17:06:01] New balance: $-71,936 | Rent paid: $0
Re: how to set paycheck roleplay? -
IndependentGaming - 09.12.2014
so ??
Re: how to set paycheck roleplay? -
IndependentGaming - 09.12.2014
Anyone now what i need to do ?
Re: how to set paycheck roleplay? -
IndependentGaming - 09.12.2014
Anyone can help me ?