Headline / Gangs

Gangs for Jailbreak Servers Running SourceMod
GNU General Public License v3.0
17 stars 7 forks source link

Make a progressive scale of prices #24

Closed SHAREN closed 7 years ago

SHAREN commented 7 years ago

// for example gcv_iHealthPrice = "20", ga_iHealth[client] = 4 // gcv_fPriceModifier = 20

price = gcv_iHealthPrice.IntValue + (gcv_iPriceModifier.IntValue * ga_iHealth[client]);     // 20 + 20*4 = 100

I suggest doing so: // for example gcv_fPriceModifier = 1.5

price = RoundToFloor(gcv_iHealthPrice.IntValue * Pow(gcv_fPriceModifier.FloatValue, ga_iHealth[client]*1.0));  // 20*1.5^4=101

on 2lvl 20 + 202 = 60 // before 201.5^2 = 45 // after on 10 lvl 20 + 2010 = 220 // before 201.5^10 = 1153 // after

Headline commented 7 years ago

Done! See: #26