I want to initiate map voting & map change process in the end of map (gun game mod). Votemap process initializes when a timeleft value is 00-30 (seconds left).
This is a way: when a mapchenge is needed, we get elapsed map time (ex.: 15 mins and 14 secs) and summ him with 3
1 seconds = 15:45, then we set timeleft to 15:45. After 1 second votemap is in process..
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "asdf"
#define VERSION "1.0"
#define AUTHOR "asdf"
new Float:g_time
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("/elapsed","elapsed")
g_time = get_gametime()
}
public elapsed()
{
new Float:elapsed_time = get_gametime() - g_time
server_print("elapsed time: %.2f",elapsed_time)
}
Is this way true?
__________________