Register for your free account! | Forgot your password?

You last visited: Today at 18:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



/cp Console command

Discussion on /cp Console command within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
/cp Console command

Ok, could some tell me how to add the command in General.cs that lets me open my Control Panel, I have no idea how to do this.....

I really need this because....

The control panel opens by it self on restarts...

And if I close the control panel it can't be opened again with out a restart....

Vortex. is offline  
Old 04/15/2009, 21:37   #2
 
elite*gold: 0
Join Date: Apr 2009
Posts: 71
Received Thanks: 5
Well if you have a control panel and you close it make it close the server too? Or create a command that has the run application in it. Look at Emme's Lame Console Commands.
r.0ck is offline  
Old 04/15/2009, 23:33   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Copy and paste the code for the original form running...
tao4229 is offline  
Old 04/15/2009, 23:41   #4
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
wdf you on about :S

#Edit figured it out thnx tao..

Code:
{
                string str;
                str = Console.ReadLine();
                if (str == "/cp")
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new Form1());
                }
Vortex. is offline  
Old 04/15/2009, 23:43   #5
 
elite*gold: 0
Join Date: Apr 2009
Posts: 71
Received Thanks: 5
Quote:
Originally Posted by Vortex. View Post
wdf you on about :S
Your saying when you close your control panel you can not reopen it...Did you even follow the How to make a form load? It gives you a small code to make the application run which Saint is talking about. He and I , but he said it in a more understandable way, To put that thing in as a new command for the console application so that you can make it load up again...
r.0ck is offline  
Old 04/16/2009, 00:38   #6
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
r.0ck nope your wrong, any way....

I need to know how to stop loft from closing when I press enter....

it works i type /cp and it opens but when but loft closes automatically, since the control panel takes over full control of the console
it freezes loft from closing, but after i close it, the console closes, I also added other codes, like clear, and help ect..

Does anyone know how to stop this?
Vortex. is offline  
Old 04/16/2009, 05:03   #7
 
elite*gold: 0
Join Date: May 2006
Posts: 14
Received Thanks: 0
Code:
            string Cmd;
            while ((Cmd = Console.ReadLine().ToLower()) != "/quit")
            {
                switch (Cmd)
                {
                    case "/cp": Application.Run(new Form1()); break;
                }
            }
Wouldn't that'd be lighter and also implement a new command? Also, you don't need to always put the...
Code:
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
...doing it once in the whole app will be fine.
Tarouka is offline  
Old 04/16/2009, 12:34   #8
 
elite*gold: 0
Join Date: Apr 2009
Posts: 71
Received Thanks: 5
you didn't even read my post i said exactly what tao said...anyway find Console.Readline(); and remove it so the console wont exit when you click enter.
r.0ck is offline  
Old 04/16/2009, 15:05   #9
 
Vortex.'s Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
Unhappy

Quote:
Originally Posted by Tarouka View Post
Code:
            string Cmd;
            while ((Cmd = Console.ReadLine().ToLower()) != "/quit")
            {
                switch (Cmd)
                {
                    case "/cp": Application.Run(new Form1()); break;
                }
            }
Wouldn't that'd be lighter and also implement a new command? Also, you don't need to always put the...
Code:
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
...doing it once in the whole app will be fine.


Thnx, gonna try it, and yes

You need to add:
Code:
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
or else the buttons won't appear....


#Edit your code doesn't work, soo... I looked at your formula, and generated my own...

Which has a new bug, I can't type/open.. control panel/cp twice...
Code:
{

            string Cmd;
            while ((Cmd = Console.ReadLine().ToLower()) != "/quit")
                if (Cmd == "/cp")
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new Form1());
                }
Vortex. is offline  
Reply


Similar Threads Similar Threads
[RELEASE] Console Commands for Lame Console Look
12/07/2011 - CO2 PServer Guides & Releases - 12 Replies
Well, to avoid any further useless posts on this subject... here are a ton of console based commands that will control the game from the server console. I will not explain what each does, it should be pretty easy to figure out, and I don't intend to answer stupid questions. If its a good question, I will answer it. public static void DoStuff() { bool flag = true; Console.Clear(); Console.ForegroundColor = ConsoleColor.Red; ...
help with the Console
02/12/2010 - CO2 Private Server - 6 Replies
ok in the console get alot of *blah blah* has suspicious amounts of cps so was wondering whats the command to delete there cps or change there cps to like 1 lol any help would be appreciated
[HELP]Console
02/09/2010 - CO2 Private Server - 7 Replies
I often get this error spamming my console, any ideas on what might be causing it or how to fix it. http://i241.photobucket.com/albums/ff313/Hanibal_ bucket/Untitled-3.jpg
[HELP] 5165 vip w/o console command
01/20/2010 - CO2 Private Server - 1 Replies
Was wondering if any1 knew how i could add accounts to the vip7-9 status useing an npc charging cps to become vip. Becoming instantly vip when born would be easier but the npc would be better because its something 2 work for.



All times are GMT +1. The time now is 18:22.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.