/password

/password

Postby Breakdown901 » 17 Jul 2013, 15:49

It compiles and loads, but when you use it it gives you the help message, when I put in "p.name".

Code: Select all
//Made by Breakdown901
using System;
namespace MCDzienny
{
   public class CmdPassword : Command
   {
      public override string name { get { return "password"; } }
      public override string shortcut { get { return ""; } }
      public override string type { get { return "other"; } }
      public override bool museumUsable { get { return false; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
      public override void Use(Player p, string message)
      {
         if (message == "") { Help(p); return; }
         {
            Player.SendMessage(p, "/password- Enter the password that can only be found by registering on the website to gain a rank and title!");
         }
              if (message == "forumsguy8")
         {
            Command.all.Find("setrank").Use(p, p.name + "prosurvivor");
            Command.all.Find("settitle").Use(p, p.name + "&aRegis&ctered");
         }
              if (message == "forumtitle1050")
         {
            Command.all.Find("settitle").Use(p, p.name + "&aRegis&ctered");
         }
      }   

      public override void Help(Player p)
      {
         Player.SendMessage(p, "/password - /password [password] Ranks you to ProSurvivor and gives you a title if you enter the correct password");
         Player.SendMessage(p, "To get the password, register on the website! Website= &aneongamingclassic.webs.com");
      }
   }
}
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54

Re: /password

Postby HETAL » 17 Jul 2013, 16:03

YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10

Re: /password

Postby ismellike » 17 Jul 2013, 16:11

You are missing a space in the string.

if I did /password [password]
it would try this command /setrank ismellikeprosurvivor
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: /password

Postby Breakdown901 » 17 Jul 2013, 17:16

I changed it, it sets the title but not the rank.

Code: Select all
//Made by Breakdown901
using System;
namespace MCDzienny
{
   public class CmdPassword : Command
   {
      public override string name { get { return "password"; } }
      public override string shortcut { get { return ""; } }
      public override string type { get { return "other"; } }
      public override bool museumUsable { get { return false; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
      public override void Use(Player p, string message)
      {
         if (message == "") { Help(p); return; }
         {
            Player.SendMessage(p, "/password- Enter the password that can only be found by registering on the website to gain a rank and title!");
         }
         if (message == "forumsguy8")
         {
            Command.all.Find("setrank").Use(p, p.name + "  prosurvivor");
            Command.all.Find("settitle").Use(p, p.name + " &aForumer");
         }
              if (message == "forumtitle1050")
         {
            Command.all.Find("settitle").Use(p, p.name + " &aForumer");
         }
      }   

      public override void Help(Player p)
      {
         Player.SendMessage(p, "/password - /password [password] Ranks you to ProSurvivor and gives you a title if you enter the correct password");
         Player.SendMessage(p, "To get the password, register on the website! Website= &aneongamingclassic.webs.com");
      }
   }
}
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54

Re: /password

Postby ismellike » 17 Jul 2013, 22:04

Code: Select all
         if (message == "") { Help(p); return; }
         {
            Player.SendMessage(p, "/password- Enter the password that can only be found by registering on the website to gain a rank and title!");
         }

needs to be changed to

Code: Select all
if (message == "") { Help(p); return; }
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas


Return to Help in Coding

Who is online

Users browsing this forum: No registered users and 5 guests