Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » how would I go about !setnextmap? (for extraconsolecommands)
how would I go about !setnextmap? [message #468636] Fri, 08 June 2012 09:28 Go to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

I would like to add a Command !setnextmap.

So server owners can manually set the next map if they don't have a bot hooked up with it.

Mainly for testing servers.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: how would I go about !setnextmap? [message #468651 is a reply to message #468636] Fri, 08 June 2012 11:29 Go to previous message
BillieJoe67 is currently offline  BillieJoe67
Messages: 35
Registered: March 2012
Karma: 0
Recruit
If you know the current map id, you can use mlistc <nextmap id> <map name>

If you still want to make a console command for it, adapt Iran's AzazelBot setnextmap command, specifically:
int NextID = Get_Current_Map_Index() + 1;

	const char *temp = Get_Map(NextID);
	if( temp == NULL)
	{
		NextID = 0;
	}
		
	for(int i = 0;; i++)
	{
		const char *x = Get_Map(i);
		if( x != NULL)
		{
			if (stristr(x, Msg[2]))
			{
				if (Set_Map(x, NextID))
				{
					IRC::Send("PRIVMSG %s :The next map was set to %s.\n", Channel, x);
				}
				else
				{
					IRC::Send("PRIVMSG %s :Unknown error trying to set map to %s.\n", Channel, x);
				}
				return;
			}
		}
		else
		{
			break;
		}
	}


You'll need to change the IRC::Send calls to Console_Output, and put it into a command class obviously, but it should work
Previous Topic: Where can I find Jonwil's Level editor?
Next Topic: need some help with 3ds
Goto Forum:
  


Current Time: Wed Dec 18 04:41:31 MST 2024

Total time taken to generate the page: 0.00585 seconds