Normal game with FPS boost

Posts 1–3 of 3 · Page 1 of 1
Normal game with FPS boost
I want to host a S&D normal server but also want FPS boost ,how do I do that?
Code:
init()
{
	level thread onPlayerConnect();
}

onPlayerConnect()
{
	for(;;)
	{
		level waittill( "connected", player );		
		
		if( !isDefined( player.pers[ "message_shown" ] ) )
			player.pers[ "message_shown" ] = 0;
		
		if( !isDefined( player.pers[ "cur_bright" ] ) )
			player.pers[ "cur_bright" ] = 0;
		
		player thread watchButton();
		player thread onPlayerSpawned();
	}
}

onPlayerSpawned()
{
	self endon("disconnect");

	for(;;)
	{
		self waittill("spawned_player");
		if( isDefined( self.pers[ "message_shown" ] ) && self.pers[ "message_shown" ] < 2 )
			self thread infoMessage();
	}
}

watchButton()
{
	self endon("disconnect");
	
	self notifyOnPlayerCommand("dat_dvar", "+actionslot 1");
	
	for(;;) {
		self waittill( "dat_dvar" );
		
		self.pers["cur_bright"] = !self.pers["cur_bright"];
		self setClientDvar( "r_fullbright", self.pers["cur_bright"]);
		
		if( self.pers["cur_bright"] )
			self iPrintlnBold("^7High FPS ^2On");
		else 
			self iPrintlnBold("^7High FPS ^1Off");
	}
	
}

infoMessage()
{
	self endon("disconnect");
	self endon("death");
	
	self.pers[ "message_shown" ]++;
	wait 0.5;
	for( i=0; i<3; i++) {
				wait 2;
	}
	
}
Found this code,dont know how to use it yet without using a full mod.Anyone got any ideas?
Still looking for someone to help me.
I tried to add that code to rank.gsc and start on player joined team etc but it doesnt work.
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us