kopalov / GTAV-SH-Mod

The Savehouse Mod for GTA V
9 stars 4 forks source link

Testing of calculations with lua #61

Open hennysmafter opened 8 years ago

hennysmafter commented 8 years ago

A lot of the ideas we got for the future are going to require calculations with percentages so it might be a good idea to start the testing on this.

kopalov commented 8 years ago

math.random , math.randomseed

math.random() generates pseudo-random numbers uniformly distributed. Supplying argument alters its behaviour:

math.random() with no arguments generates a real number between 0 and 1.
math.random(upper) generates integer numbers between 1 and upper.
math.random(lower, upper) generates integer numbers between lower and upper.
kopalov commented 8 years ago

Houses are assigned a price for buying. Currently when it is sold you gain the same amount of money. No risk, No reward. So maybe this can be changed.

  1. Adding costs for the realtor.
  2. You select which realtor can sell it with all different prices but also different percentages in getting a big payout.

This way when you take the cheap realtor and are lucky you get a real big payout but when you are unlucky you make a huge loss.