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)
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:
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
 
Read Message
Read Message
Previous Topic: Where can I find Jonwil's Level editor?
Next Topic: need some help with 3ds
Goto Forum:
  


Current Time: Mon Nov 25 11:20:05 MST 2024

Total time taken to generate the page: 0.00568 seconds