[Half-Life AMXX] / content_server.sma Repository:
ViewVC logotype

View of /content_server.sma

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (annotate)
Tue Oct 30 09:08:11 2007 UTC (16 years, 5 months ago) by ian
File size: 822 byte(s)
#include <amxmodx>
#include <amxmisc>

#define VERSION "0.2"

new p_baseurl, p_sid //, p_dlurl

public plugin_init( )
{
	register_plugin( "Content Server", VERSION, "Ian Cammarata" )
	register_cvar( "content_server_version", VERSION, FCVAR_SERVER )
	
	p_baseurl = register_cvar( "sv_downloadbaseurl", "", FCVAR_PROTECTED )
	p_sid = register_cvar( "sv_downloadserverid", "", FCVAR_PROTECTED )
	//p_dlurl = 
	get_cvar_pointer( "sv_downloadurl" )
	
	new urlstr[100],map[36]
	get_pcvar_string( p_baseurl, urlstr, 99 )
	if( strlen( urlstr ) )
	{
		new sid[20]
		get_pcvar_string( p_sid, sid, 10 )
		if( strlen( sid ) ) format( sid, 19, "&sid=%s", sid )
		
		get_mapname( map, 35 )
		format( urlstr, 99, "%s?map=%s%s&res=", urlstr, map, sid )
		
		set_cvar_string( "sv_downloadurl", urlstr )
	}
}

Contact
ViewVC Help
Powered by ViewVC 1.0.4