Raised This Month: $ Target: $400
 0% 

unique match id


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
usabrad86
Junior Member
Join Date: Jun 2009
Location: Florida
Old 06-29-2009 , 21:14   unique match id
Reply With Quote #1

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(cmd63"record %s",sv_matchuid);
    
    
log_amx("Command sent to HLTV(%s).",cmd);
    
hltv_rcon_cmd(cmd);
    return 
PLUGIN_CONTINUE

usabrad86 is offline
Send a message via AIM to usabrad86
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode