Selling my game pc
#6

Here, calculate your sales with this simple pawn code/snippet

pawn Код:
// Credits: Gammix
stock Float:ReturnSaleValue(Float:actual_price, Float:hours_bought, Float:hours_used, Float:quality, Float:rate_of_hours = 0.75, Float:rate_of_usage = 0.3)
{
    new Float:used = (((1.0 - (hours_used / hours_bought)) * rate_of_hours) - (hours_used / hours_bought));
    if (used < 0.0)
        used *= -1;
   
    new Float:deduct[2];
    deduct[0] = ((actual_price * ((used <= 0.0) ? (1.0) : (used))) * rate_of_usage);
    deduct[1] = (actual_price - (quality * (actual_price / 100.0)));

    return (actual_price - (deduct[0] + deduct[1]));
}
Lets calculate a simple GTX 970M:

Original Price: 455
Hours Bought: 8760 (1 year)
Hours Used: 1460 (2 months)
Current Quality: 70%

Код:
printf("GTX 970M would sale best at %f!", ReturnSaleValue(455, 8760, 1460, 70));
Output:
Quote:

GTX 970M would sale best at 238.875000!

Reply


Messages In This Thread
Selling my game pc - by Mistermaru - 15.03.2016, 22:16
Re: Selling my game pc - by Alex Magaсa - 15.03.2016, 22:32
Re: Selling my game pc - by Mistermaru - 15.03.2016, 23:05
Re: Selling my game pc - by Duck - 15.03.2016, 23:22
Re: Selling my game pc - by aymel - 15.03.2016, 23:58
Re: Selling my game pc - by Gammix - 16.03.2016, 00:50
Re: Selling my game pc - by jamesbond007 - 16.03.2016, 01:51
Re: Selling my game pc - by Jese - 17.03.2016, 19:43
Re: Selling my game pc - by aymel - 18.03.2016, 13:28
Re: Selling my game pc - by kaisersouse - 18.03.2016, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)