Correcting jim_yang... ^^
Code:
#include <amxmodx>
#include <amxmisc>
#define VERSION "1.0"
static mapname[32]
public plugin_init()
{
register_plugin("Auto Record", VERSION, "dzverg")
get_mapname(mapname, 31)
}
public client_putinserver(id)
{
new value[2]
get_user_info(id, "_autorecord", value, 1)
if(equal(value, "1"))
{
new timedata[32], demoname[100]
get_time("%y%m%d%H%M", timedata, 31)
format(demoname, 99, "%s%s", timedata, mapname) // No need of ".dem"
client_cmd(id, "record %s", demoname) // It is one single String
}
return PLUGIN_CONTINUE
}
__________________