unique match id
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:
|
Re: unique match id
If the server crashes the cvar will be reset to the default value.
You probably need to write the number to a file and update it (write to the file) when you send the record command. |
Re: unique match id
why not using systime... itīs then not a following number but really unique
if you are using mysql too you could insert the systime to a table, second coloumn with auto increment value then you have a following unique number (maybe also possible with sqlite or nvault, i donīt know) get_systime() http://www.amxmodx.org/funcwiki.php?go=func&id=251 |
Re: unique match id
well if you think HLTV allready puts time stamp in the demo
but i was also thinking about useing mysql to store and grab+1 and saving that to a cvar you think this would work better? |
| All times are GMT -4. The time now is 15:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.