[Official Guide] LSRP Savings calculator v2.1b [26JULY]

Find all sorts of guides created by our community here. Includes guides such as drug use, roleplaying different types of characters, weapons etc.

Moderators: R.Hout, Game Admins, LS:RP Testers, Player Support Mods, Lead Admins

Forum rules
The guides you see here have been unofficially created by the players, for the players. LSRP cannot be held responsible for the accuracy of any of the content you see here.

[Official Guide] LSRP Savings calculator v2.1b [26JULY]

Postby Mmartin on Thu Mar 29, 2012 1:26 pm

LSRP Savings Calculator v2.1c

Hello.
So, I saw THIS THREAD and it's savings calculator and I decided to improve it a bit. This thread is not about savings, it's just improved version of the calculator, for savings thread, CLICK HERE

URL: http://www.newfag.net/lsrp/savings/

What is better on your calculator?
This calculator can show you how much hours/paydays do you have to wait for exact amount of money. Also, it will calculate "checkpoints" to this amount. So, for example, you have $100.000 in your savings and you want to get $20.000.000. It'll calculate exact name of paydays and days you have to wait to get $20.000.000 and also how many paydays or days do you have to wait for each checkpoint (step - $100.000). For example:

Image

Image


I think that everyone got the point.
Used technologies: PHP 5.
Formula for savings: log(target/now)/log(1+0.005)
Source code: PM me if you want to see source code.

Version 2.1 Changelog:
Spoiler: show
Bugs Fixed:
  • Rounding numbers (When you setted current amount e.g $125.000, checkpoints were $215.000, $315.000. Not anymore)
  • Rounding numbers in total aprox. days.

Features Added:
  • You can calculate interest too!
    • Min. Amount = $1
    • Max. Target = $1.000.000.000
    • From $1, You will have $50,000,000 in 17736 paydays (aprox. 2533 days).
  • Symbol $ everywhere so it's more keeewl.
  • Interest for each checkpoint.

Changes:
  • "Current amount in savings" => "Current amount" (v2.1b)
  • "Calculate savings" => "Calculate" (v2.1b)
Last edited by Mmartin on Thu Jul 26, 2012 11:27 am, edited 6 times in total.
Image Mmartin
Development Team SA-MP Tester Team

Image
On absence 30th March - 5th April
User avatar
Mmartin
Head of Development
Head of Development
 
Posts: 7839
Joined: Thu Mar 01, 2012 10:05 pm
Location: Basement
Ingame name: Lucas Foreman

Re: [GUIDE] LSRP Savings calculator v2.0

Postby TwentyThree on Thu Mar 29, 2012 7:23 pm

Very useful tool, will definitelly use it. Used another savings calculator, will see if this is any different.

Image★ ★ ★ ★ ★ ★ ★ ★
Cameron Sheehan

Previous:
Milenko Davidovic
Cesarion Castillo
★ ★ ★ ★ ★ ★ ★ ★
User avatar
TwentyThree
Game Menace
Game Menace
 
Posts: 275
Joined: Fri Feb 24, 2012 10:12 pm
Location: Market Street 4, Fort Carson, San Andreas.

Re: [GUIDE] LSRP Savings calculator v2.0

Postby DurkL on Fri Mar 30, 2012 1:11 am

Image

Good job!
Image
User avatar
DurkL
Wannabe Mafia
Wannabe Mafia
 
Posts: 193
Joined: Fri Dec 16, 2011 7:13 am
Location: Twin Cities
Ingame name: Big McLarge

Re: [GUIDE] LSRP Savings calculator v2.0

Postby Birdman on Fri Mar 30, 2012 7:35 am

You are pretty good at coding, excellent work my friend. The calculator works perfectly.
User avatar
Birdman
Retired Administrator
Retired Administrator
 
Posts: 14012
Joined: Thu Oct 28, 2010 4:55 pm
Ingame name: Jason_Hugh

Re: [GUIDE] LSRP Savings calculator v2.0

Postby Yardie on Fri Mar 30, 2012 3:32 pm

Good job! This has also opened my eyes to just how time consuming this all is.
The "Cinco de Mayo Skipper", Jack Callahan
http://www.latimes.com/news/local/cinco_de_mayo_skipper-2014
User avatar
Yardie
Wannabe Don
Wannabe Don
 
Posts: 2119
Joined: Sun Apr 17, 2011 5:07 am
Location: London
Ingame name: Wild Jack!

Re: [GUIDE] LSRP Savings calculator v2.0

Postby White22 on Fri Mar 30, 2012 3:35 pm

Shit 800 hours. Gonna take a while for 20 mil :( lol
Just RP till then eh?
User avatar
White22
- Bronze Member -
- Bronze Member -
 
Posts: 258
Joined: Thu Jan 26, 2012 2:17 am
Location: London, United Kingdom

Re: [GUIDE] LSRP Savings calculator v2.0

Postby Fibs on Fri Mar 30, 2012 5:43 pm

Works perfectly, couldn't describe it better.
Now that's something that deserves applause! :wink:
Eric DUCK Soh
Image
Fibs
Wannabe Don
Wannabe Don
 
Posts: 4275
Joined: Sat Oct 01, 2011 9:17 pm

Re: [GUIDE] LSRP Savings calculator v2.0

Postby Prowler on Fri Mar 30, 2012 8:22 pm

Wow, an even better savings calculator! Thanks for this, finally I can calculate the aprox of days it would take :D
Image
User avatar
Prowler
Wannabe Don
Wannabe Don
 
Posts: 1143
Joined: Tue Jul 19, 2011 12:10 pm
Location: Sweden

Re: [GUIDE] LSRP Savings calculator v2.0

Postby Mmartin on Fri Mar 30, 2012 10:03 pm

Version 2.1 Beta out!
http://www.newfag.net/lsrp/savings/


Bugs Fixed:
  • Rounding numbers (When you setted current amount e.g $125.000, checkpoints were $215.000, $315.000. Not anymore)
  • Rounding numbers in total aprox. days.

Features Added:
  • You can calculate interest too!
    • Min. Amount = $1
    • Max. Target = $1.000.000.000
    • From $1, You will have $50,000,000 in 17736 paydays (aprox. 2533 days).
  • Symbol $ everywhere so it's more keeewl.
  • Interest for each checkpoint.
Image Mmartin
Development Team SA-MP Tester Team

Image
On absence 30th March - 5th April
User avatar
Mmartin
Head of Development
Head of Development
 
Posts: 7839
Joined: Thu Mar 01, 2012 10:05 pm
Location: Basement
Ingame name: Lucas Foreman

Re: [GUIDE] LSRP Savings calculator v2.1 [NEW UPDATE!]

Postby Silence. on Fri Mar 30, 2012 10:12 pm

Woah, works great, great job.
I, Raoul Garcia [Silence.], will join the probation group in order to serve my debt to Los Santos Role Play. I choose to follow the rules inside of the group as followed. I am fully aware that the tasks involved can change and or even expand as the leads see fit. I will agree to a ban if I can not fufill the groups purpose!
Silence.
Wannabe Don
Wannabe Don
 
Posts: 1667
Joined: Thu Jun 16, 2011 6:57 pm
Location: UK, England, Birmingham
Ingame name: Parrot

Re: [GUIDE] LSRP Savings calculator v2.1 [NEW UPDATE!]

Postby Mmartin on Sat Mar 31, 2012 10:48 am

Code has been a bit optimized, also some label changes:
Spoiler: show
Changes:
  • "Current amount in savings" => "Current amount" (v2.1b)
  • "Calculate savings" => "Calculate" (v2.1b)


Also, I added new demo images to main topic.
Image Mmartin
Development Team SA-MP Tester Team

Image
On absence 30th March - 5th April
User avatar
Mmartin
Head of Development
Head of Development
 
Posts: 7839
Joined: Thu Mar 01, 2012 10:05 pm
Location: Basement
Ingame name: Lucas Foreman

Re: [GUIDE] LSRP Savings calculator v2.1b [31march]

Postby Jeronix on Sat Mar 31, 2012 1:23 pm

The interest calculator is incorrect for amounts above 20m, as above 20m you get half of the old amount, plus five times more taxes. So lets say with 100m in bank, you'll actually get like 10k instead of 100k which it says.
I, Jeronix, will join the probation group in order to serve my debt to Los Santos Role Play. I choose to follow the rules inside of the group as followed. I am fully aware that the tasks involved can change and or even expand as the leads see fit. I will agree to a ban if I can not fulfill the groups purpose!
Jeronix
Wannabe Don
Wannabe Don
 
Posts: 2199
Joined: Wed Aug 25, 2010 9:17 pm
Ingame name: Vincent Carney

Re: [GUIDE] LSRP Savings calculator v2.1b [31march]

Postby Mmartin on Sat Mar 31, 2012 1:49 pm

Leonardo_Barzini Wrote:The interest calculator is incorrect for amounts above 20m, as above 20m you get half of the old amount, plus five times more taxes. So lets say with 100m in bank, you'll actually get like 10k instead of 100k which it says.

Umm. Since I have no idea about taxes formula, I did not implemented it. But, thanks for correcting me. I fixed it, Um, it's like.. This ($i = amount of current checkpoint; $now = current amount in bank;, it should be understandable for someone who knows something about math, heh):
Code: Select All Code
if ($i<=20000000)
{
 $paydays = round(log($i/$now)/log(1+0.001));
 $interest= $i*0.001;
}else{
 $paydays = round(log(20000000/$now)/log(1+0.001))+round(log($i/20000000)/log(1+0.0005));
 $interest= $i*0.0005;
}
Image Mmartin
Development Team SA-MP Tester Team

Image
On absence 30th March - 5th April
User avatar
Mmartin
Head of Development
Head of Development
 
Posts: 7839
Joined: Thu Mar 01, 2012 10:05 pm
Location: Basement
Ingame name: Lucas Foreman

Re: [GUIDE] LSRP Savings calculator v2.1b [31march]

Postby Koehler on Fri Apr 06, 2012 12:04 am

Whoa, someone make this sticky. Really useful tool. Good job.
User avatar
Koehler
God of Spammers
God of Spammers
 
Posts: 10445
Joined: Fri Feb 24, 2012 3:18 pm
Location: Sinner Hill
Ingame name: Albert_Mauro

Re: [GUIDE] LSRP Savings calculator v2.1b [31march]

Postby Mmartin on Tue Apr 10, 2012 10:38 am

I am glad you guys like it, I am glad that I've got some support in game about it, but currently I am out of ideas.

What would you like to see next? Some graphic user interface or some more functions (define what), ooor what?
Image Mmartin
Development Team SA-MP Tester Team

Image
On absence 30th March - 5th April
User avatar
Mmartin
Head of Development
Head of Development
 
Posts: 7839
Joined: Thu Mar 01, 2012 10:05 pm
Location: Basement
Ingame name: Lucas Foreman

Next

Return to Player-Created Guides

Who is online

Users browsing this forum: No registered users and 2 guests