function serverCmdSetRound(%client, %i)
{
	if(!%client.isAdmin)
		return;
	
	if(mFloor(%i) !$= %i)
	{
		messageClient(%client, '', "Usage: /setRound <number>");
		return;
	}
	
	for(%aaa = 0; %aaa < $DefaultMinigame.numMembers; %aaa++)
	{
		%member = $DefaultMinigame.member[%aaa];
		if(isObject(%member))
		{
			%camera = %member.camera;
			%camera.setFlyMode();
			%camera.mode = "Observer";
			%member.setControlObject(%camera);
		}
	}
	
	if(%i > $Pref::Server::DeathMatch::RoundLimit)
		%i = $Pref::Server::DeathMatch::RoundLimit;
	
	messageAll('MsgAdminForce', '\c3%1\c2 changed to \c3round %2\c2.', %client.getPlayerName(), %i);
	//yes, we are allowing negative rounds. in a much earlier version of dm full this was unintentional but after i discovered it, i liked using it for testing!
	
	cancel($DM::Tick);
	DM_Tick(0);
	$DM::ResetCount = %i - 1;
}

function serverCmdNextRound(%client)
{
	if(!%client.isAdmin)
		return;
	
	messageAll('MsgAdminForce', '\c3%1\c2 skipped the round.', %client.getPlayerName());
	if($DM::ResetCount >= $Pref::Server::DeathMatch::RoundLimit)
	{
		serverCmdNextMap(%client);
		return;
	}
	
	for(%aaa = 0; %aaa < $DefaultMinigame.numMembers; %aaa++)
	{
		%member = $DefaultMinigame.member[%aaa];
		if(isObject(%member))
		{
			%camera = %member.camera;
			%camera.setFlyMode();
			%camera.mode = "Observer";
			%member.setControlObject(%camera);
		}
	}
	
	cancel($DM::Tick);
	DM_Tick(0);
}

function serverCmdSkipRound(%client)
{
	serverCmdNextRound(%client);
}

function serverCmdSetMap(%client, %i)
{
	if(!%client.isAdmin)
		return;
	
	if(mFloor(%i) !$= %i)
	{
		messageClient(%client, '', "Usage: /setMap <number>");
		return;
	}

	if(%i < 0)
		%i = 0;
	
	if(%i > $DM::numMaps)
		%i = $DM::numMaps;
	
	messageAll('MsgAdminForce', '\c3%1\c2 set the map to \c3%2\c2.', %client.getPlayerName(), DM_getMapName(%i));
	
	for(%aaa = 0; %aaa < $DefaultMinigame.numMembers; %aaa++)
	{
		%member = $DefaultMinigame.member[%aaa];
		if(isObject(%member))
		{
			%camera = %member.camera;
			%camera.setFlyMode();
			%camera.mode = "Observer";
			%member.setControlObject(%camera);
		}
	}
	
	$DM::CurrentMap = %i - 1;
	$DM::BypassRandom = true;
	schedule(3000, 0, DM_NextMap);
}

function serverCmdSetTrack(%client, %i)
{
	serverCmdSetMap(%client, %i);
}

function serverCmdNextMap(%client)
{
	if(!%client.isAdmin)
		return;
	
	messageAll('MsgAdminForce', '\c3%1\c2 skipped to the next map.', %client.getPlayerName());
	
	for(%aaa = 0; %aaa < $DefaultMinigame.numMembers; %aaa++)
	{
		%member = $DefaultMinigame.member[%aaa];
		if(isObject(%member))
		{
			%camera = %member.camera;
			%camera.setFlyMode();
			%camera.mode = "Observer";
			%member.setControlObject(%camera);
		}
	}
	
	$DM::BypassRandom = true;
	schedule(3000, 0, DM_NextMap);
}

function serverCmdSkipMap(%client)
{
	serverCmdNextMap(%client);
}

function serverCmdNextTrack(%client)
{
	serverCmdNextMap(%client);
}

function serverCmdSkipTrack(%client)
{
	serverCmdNextMap(%client);
}

function serverCmdRandomMap(%client)
{
	if(!%client.isAdmin)
		return;
	
	messageAll('MsgAdminForce', '\c3%1\c2 skipped to a random map.', %client.getPlayerName());
	
	for(%aaa = 0; %aaa < $DefaultMinigame.numMembers; %aaa++)
	{
		%member = $DefaultMinigame.member[%aaa];
		if(isObject(%member))
		{
			%camera = %member.camera;
			%camera.setFlyMode();
			%camera.mode = "Observer";
			%member.setControlObject(%camera);
		}
	}
	
	$DM::ForceRandom = true;
	schedule(3000, 0, DM_NextMap);
}

function serverCmdRandomTrack(%client)
{
	serverCmdRandomMap(%client);
}