[HELP] Working with dates (Property Tax)
#1

Hello guys, I'm trying to script a property tax system and having a rough time how to set date for a bought car (the day that a player buys the car) and give them a daily tax. Can someone please explain this logic? (Btw my gamemode is based on MySQL)

I've searched a lot but couldn't find any results.
Reply
#2

Up...
Reply
#3

The best way(atleast in my own opinion) is to use timestamps for data functions. What do you mean by a "daily tax" though? When they log in on a different day? When it's strictly been 24 hours from the time bought? They've played 24 hours?
Reply
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
The best way(atleast in my own opinion) is to use timestamps for data functions. What do you mean by a "daily tax" though? When they log in on a different day? When it's strictly been 24 hours from the time bought? They've played 24 hours?
Let me explain this through an example.

You bought a Infernus. ($100.000) It's daily tax will be %0.25 which is $250. The time they bought the car will be stored in database. (D/M/Y) Let's say they bought the car today. (20.3.2016) And tomorrow the vehicle tax will be $250. (stored in database as well)

For an even simple explanation; I want to change the tax (increase it) day by day.
Reply
#5

Quote:
Originally Posted by WhoIsYourDaddy
Посмотреть сообщение
Let me explain this through an example.

You bought a Infernus. ($100.000) It's daily tax will be %0.25 which is $250. The time they bought the car will be stored in database. (D/M/Y) Let's say they bought the car today. (20.3.2016) And tomorrow the vehicle tax will be $250. (stored in database as well)

For an even simple explanation; I want to change the tax (increase it) day by day.
You're talking about exponential growth. Here's an example:

Example
x0 = 50
r = 4% = 0.04
t = 90 hours
x(t) = x0 Ч (1 + r) t = 50Ч(1+0.04)90 = 1706

Source http://www.rapidtables.com/calc/math...calculator.htm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)