I want to make a plugin wich execute a certain command at a specific time. There are some cvar like:
Code:
p_Year = register_cvar("sh_resetyear", "2014")
p_Month = register_cvar("sh_resetmonth, "1")
p_Day = register_cvar("sh_resetday", "1")
p_Hour = register_cvar("sh_resethour", "1")
p_Minute = register_cvar("sh_resetminute", "1")
p_Second = register_cvar("sh_resetsecond", "1")
So, in 2014, first month of the year, first day of the month, first hour of the day, first minute of the hour and first second of the minute a command will be executed.
I need to transform a date into epoch time so I could use get_systime() and obatin the difference(in seconds) between today and a specific date. After I get the result of this difference I can easily find out how many days, hours, minutes and seconds are until the execution of the command, so I can show it on a hud message.
Now you know what my plugin should do. I think that this method is the best, if you know another wich is better please share it with me or help me to transform a specific date into epoch.