/spawnplayer

/spawnplayer

Postby ane200055 » 29 Jul 2013, 14:16

/spawnplayer PlayerName Sends a player to spawn.
Shortcut: /spawnp
Code: Select all
//Made by ane200055
//Version: v0.1
using System;
namespace MCDzienny
{
   public class CmdSpawnplayer : Command
   {
      public override string name { get { return "spawnplayer"; } }
      public override string shortcut { get { return "spawnp"; } }
      public override string type { get { return "mod"; } }
      public override bool museumUsable { get { return false; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
      public override void Use(Player p, string message)
        {
            if (message == "")
         
         {
         Help(p);
         return;
         }

          Player who = Player.Find(message.Split(' ')[0]);
                      if (who == null)
        {
          Player.SendMessage(p, "Couldn't find player.");
          return;
     }
     else
          {
              Player.SendMessage(p, "Trying to send " + who.color + who.name + Server.DefaultColor + " to spawn......");
           Command.all.Find("make").Use(p, who.name + " spawn");
            }

        }     
     
      public override void Help(Player p)
      {
         Player.SendMessage(p, "%e/spawnplayer %bPlayerName %esends a player spawn.");
       Player.SendMessage(p, "%eThis also works by doing /spawnp %bPlayerName%e.");
      }
   }
}
Website: http://ane200055.co.vu
The Developer of The XtraIRC IRC Client: http://xtrairc.tk
C# coder.
User avatar
ane200055
 
Posts: 98
Joined: 30 Jun 2013, 09:07
Location: United Kingdom

Re: /spawnplayer

Postby Clowny » 29 Jul 2013, 16:27

Well there's a slight problem with this command not a lot of people name their main map "spawn" and what this command is looking for is a map named spawn thereby this command would either have to be edited or the owner forced to make the main map "spawn". Just a thought.
Founder Of MC Classic Hosting Community http://mcclassichosting.webs.com
Founder of MC Classic Software MCReborn http://mcreborn.tk
Professional Hoster and Basic C# Coder
Image
User avatar
Clowny
 
Posts: 112
Joined: 14 Jul 2013, 03:53

Re: /spawnplayer

Postby ane200055 » 29 Jul 2013, 17:41

Clowny wrote:Well there's a slight problem with this command not a lot of people name their main map "spawn" and what this command is looking for is a map named spawn thereby this command would either have to be edited or the owner forced to make the main map "spawn". Just a thought.

No, it does not take the player to the main map it emulates doing /make PlayerName spawn .
So then it will take the player to the map's spawn.
Website: http://ane200055.co.vu
The Developer of The XtraIRC IRC Client: http://xtrairc.tk
C# coder.
User avatar
ane200055
 
Posts: 98
Joined: 30 Jun 2013, 09:07
Location: United Kingdom

Re: /spawnplayer

Postby lucasds12 » 02 Aug 2013, 07:53

Command already implemented, /reveal.
/reveal - reloads the map for user.
/reveal all - reloads the map for all users. (incl. banned)
But, this is a good command you did.
-Lucas
There is only one thing I do in life, that's contributing here.
lucasds12
 
Posts: 334
Joined: 17 Apr 2013, 16:17
Location: In the deep caves.

Re: /spawnplayer

Postby ane200055 » 02 Aug 2013, 14:33

lucasds12 wrote:Command already implemented, /reveal.
/reveal - reloads the map for user.
/reveal all - reloads the map for all users. (incl. banned)
But, this is a good command you did.
-Lucas

Yea, However the problem with /reveal is, is that if the map is a big then there is a lot to load for the player and the player will have to wait for a long time for the map to reload but with /spawnplayer it will just take them to spawn so it does not need to load anything.
Website: http://ane200055.co.vu
The Developer of The XtraIRC IRC Client: http://xtrairc.tk
C# coder.
User avatar
ane200055
 
Posts: 98
Joined: 30 Jun 2013, 09:07
Location: United Kingdom


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 3 guests

cron