can someone give me a sample code to generate a unique matchid
for ex. if i type in server console amx_newmatchid i need cvar sv_matchuid to go +1 BUT i need it to be unique(lets say server crashes or...something stupid)
i cant have sv_matchuid reset to 0.. BUT is server does crash on sv_matchuid "517" i need the the next match to be 518 and so on
why i need this.. its for my HLTV server so i dont get my demos mixed up and so people can download the hltv demo with the match id that know-of
im useing HLTV-invite to send commands to hltv
this is the code have for hltv-invite
PHP Code:
public hltv_record() {
new cmd[64]
//GrabMatchID
new sv_matchuid[6]
get_cvar_string("sv_matchuid",sv_matchuid,6);
//stop-recording before start-recording
hltv_stoprecord()
//this is the command sent to HLTV
format(cmd, 63, "record %s",sv_matchuid);
log_amx("Command sent to HLTV(%s).",cmd);
hltv_rcon_cmd(cmd);
return PLUGIN_CONTINUE
}