/openGUI

/openGUI

Postby HETAL » 04 Oct 2013, 21:48

Code: Select all
using System;
using System.Windows.Forms;
//made by the famous HETAL (Hetal728)
namespace MCDzienny
{
    public class CmdOpenGui : Command
    {
        public override string name { get { return "opengui"; } }
        public override string shortcut { get { return "og"; } }
        public override string type { get { return "other"; } }
        public override bool museumUsable { get { return true; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
        public override bool ConsoleAccess { get { return false; } }

        public override void Use(Player p, string message)
        {
            {
            }
            if (MCDzienny.Gui.Window.thisWindow.WindowState == FormWindowState.Minimized) { MCDzienny.Gui.Window.thisWindow.WindowState = FormWindowState.Normal; }
            Player.SendMessage(p, "Opening the console GUI...");
        }
        public override void Help(Player p)
        {
            Player.SendMessage(p, "/opengui - Opens the console GUI.");
        }
    }
}
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10

Re: /openGUI

Postby HETAL » 04 Oct 2013, 21:49

This command basically opens up the console if it is minimized, I was trying to make it use a console sound event but couldn't find one for MCDzienny
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10

Re: /openGUI

Postby Vvfj » 05 Oct 2013, 08:26

HETAL wrote:This command basically opens up the console if it is minimized, I was trying to make it use a console sound event but couldn't find one for MCDzienny

Nice! ive always wanted to know how to "unminimizize" the console.
Owner of Epicraft
Vvfj
 
Posts: 36
Joined: 30 Aug 2013, 17:24

Re: /openGUI

Postby toystory_justin » 05 Oct 2013, 16:09

Lol i was wondering if a server i play on has this command and the guest can open the gui? or im thinking diff
toystory_justin
 
Posts: 224
Joined: 11 Nov 2012, 07:12
Location: On a dark place

Re: /openGUI

Postby HETAL » 05 Oct 2013, 16:24

Its if you want to get the server's owner's attention, like if he is playing on another server and someone uses this command, the console will pop up on the owner's screen.
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10

Re: /openGUI

Postby joppiesaus » 05 Oct 2013, 16:52

Nice! But... doesn't give it any compile errors? Because of this:
Code: Select all
        public override void Use(Player p, string message)
        {
            { // <-- ? What are these things doing here?
            } // <--
            if (MCDzienny.Gui.Window.thisWindow.WindowState == FormWindowState.Minimized) { MCDzienny.Gui.Window.thisWindow.WindowState = FormWindowState.Normal; }
            Player.SendMessage(p, "Opening the console GUI...");
        }
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: /openGUI

Postby HETAL » 05 Oct 2013, 16:58

It doesn't give any errors, but that should have been removed when I was going through this with SharpDevelop
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 2 guests

cron