/xspawn

/xspawn

Postby Rookie » 26 Feb 2013, 08:09

Hi, I'm wanting the /xspawn command but I have no idea how to code and can't find it anywhere.
/xspawn respawns a player back to the spawn. I would love you even more if you could somehow get it to work with an /xundo.

This command helps a bunch with block spammers. Thanks in advance. ;)
Rookie
 
Posts: 2
Joined: 26 Feb 2013, 08:01

Re: /xspawn

Postby LogicaLucidity » 26 Feb 2013, 09:03

Rookie wrote:/xspawn respawns a player back to the spawn.


You are looking for /reveal

/reveal <name> - Reveals the map for <name>
/reveal all - Reveals for all in the map
Will reload the map for anyone. (incl. banned)

Reloading the map for someone with /reveal puts them back at spawn.

- Logic
- [Logic] Lava Survival -
User avatar
LogicaLucidity
 
Posts: 104
Joined: 17 Oct 2011, 09:36

Re: /xspawn

Postby toystory_justin » 26 Feb 2013, 09:46

LogicaLucidity wrote:
Rookie wrote:/xspawn respawns a player back to the spawn.


You are looking for /reveal

/reveal <name> - Reveals the map for <name>
/reveal all - Reveals for all in the map
Will reload the map for anyone. (incl. banned)

Reloading the map for someone with /reveal puts them back at spawn.

- Logic

He means when the ops type /xspawn, and they will be sent to spawn. Then when the user that got xspawned, the user will be able to go back to his position by typing 'r' Understand? Idk what im typing :P
toystory_justin
 
Posts: 224
Joined: 11 Nov 2012, 07:12
Location: On a dark place

Re: /xspawn

Postby LogicaLucidity » 26 Feb 2013, 10:23

One of the things that was asked for was a way to re-spawn a player back to spawn.

/reveal does exactly that.

If you yourself want to go back to spawn yourself then type /spawn.

If you want to set a custom spawn point you can hit 'Enter' and the 'R' to return there.

The extra things you described are not remotely mentioned in his post.

Are you suggesting that you need to be able to re-spawn a user and in turn have it as if they hit 'enter' creating a custom spawn position before you re-spawned them, located at their previous position, that they can return to with the 'R' key after you re-spawned them?

I fail to understand the logic or purpose of such a command.

If an op is re-spawning a user, why would you want the user to immediately be able to return to the place you just pulled them from?

Now, I did not address the idea of adding a re-spawn type factor to /xundo.

I was going to allow someone more skilled in command coding address that issue.

...but again, to answer the OP... to re-spawn someone back to spawn, you can use /reveal.

What I typed is as true now as when I typed it.

Please, try not to speak for the OP. If he needs to re-explain in more detail, he will.

- Logic
- [Logic] Lava Survival -
User avatar
LogicaLucidity
 
Posts: 104
Joined: 17 Oct 2011, 09:36

Re: /xspawn

Postby toystory_justin » 26 Feb 2013, 11:28

LogicaLucidity wrote:One of the things that was asked for was a way to re-spawn a player back to spawn.

/reveal does exactly that.

If you yourself want to go back to spawn yourself then type /spawn.

If you want to set a custom spawn point you can hit 'Enter' and the 'R' to return there.

The extra things you described are not remotely mentioned in his post.

Are you suggesting that you need to be able to re-spawn a user and in turn have it as if they hit 'enter' creating a custom spawn position before you re-spawned them, located at their previous position, that they can return to with the 'R' key after you re-spawned them?

I fail to understand the logic or purpose of such a command.

If an op is re-spawning a user, why would you want the user to immediately be able to return to the place you just pulled them from?

Now, I did not address the idea of adding a re-spawn type factor to /xundo.

I was going to allow someone more skilled in command coding address that issue.

...but again, to answer the OP... to re-spawn someone back to spawn, you can use /reveal.

What I typed is as true now as when I typed it.

Please, try not to speak for the OP. If he needs to re-explain in more detail, he will.

- Logic

/xspawn is the command that Ultima has on his server, that command does that actually on his server..
Last edited by HelloWorldCool on 26 Feb 2013, 22:13, edited 1 time in total.
Reason: Saving forum space. :)
toystory_justin
 
Posts: 224
Joined: 11 Nov 2012, 07:12
Location: On a dark place

Re: /xspawn

Postby LogicaLucidity » 26 Feb 2013, 11:51

Thank you for not answering all of my questions...

My points remain valid.

So, you are telling me that re-spawning a player back to spawn and automatically setting their previous point as a custom spawn point so they can immediately hit 'R' and go back to the exact spot you pulled them from has a purpose?

Please explain in detail. I am always eager to learn new things. ... go on...

I know that aBlockz has that command. It is documented on his forums. It is stated to take a user back to spawn.
As for automatically setting their previous point as a custom spawn point so they can immediately hit 'R' and go back to the exact spot you pulled them from??? This is counter intuitive as you use this command to remove players from other users builds. Allowing such a feature would allow them to immediately return.

Do you understand?

My advice to the OP to their original inquiry is still valid.

- Logic
Last edited by LogicaLucidity on 26 Feb 2013, 11:54, edited 1 time in total.
- [Logic] Lava Survival -
User avatar
LogicaLucidity
 
Posts: 104
Joined: 17 Oct 2011, 09:36

Re: /xspawn

Postby toystory_justin » 26 Feb 2013, 11:53

LogicalLudicity, are you mad? ._.
toystory_justin
 
Posts: 224
Joined: 11 Nov 2012, 07:12
Location: On a dark place

Re: /xspawn

Postby LogicaLucidity » 26 Feb 2013, 12:04

Still no answer?

That is what I thought :roll:

Nothing of value is being added to this thread.

Moving on...

- Logic
- [Logic] Lava Survival -
User avatar
LogicaLucidity
 
Posts: 104
Joined: 17 Oct 2011, 09:36

Re: /xspawn

Postby Conor » 26 Feb 2013, 12:10

Go to your console and type /cmdcreate xspawn.

Find Cmdxspawn.cs in the extra/commands/source folder.

Open it in notepad (quick and easy) and find the section that looks like this:

Code: Select all
public override void Use(Player p, string message)
{
   
}


Inside these curly braces you can insert the following code:

Code: Select all
if (String.IsNullOrEmpty(message) || message.IndexOf(' ') != -1)
{
   Help(p);
   return;
}

Player who = Player.Find(message);
if (who != null && !who.hidden)
{
   if (who.group.Permission < p.group.Permission)
   {
      Command.all.Find("spawn").Use(who, "");
      if (p != null)
      {
            Player.SendMessage(who, p.color + p.PublicName + Server.DefaultColor + " sent you to the spawn.");
      }
      else
      {
            Player.SendMessage(who, "The console sent you back to the spawn.");
      }
      Player.SendMessage(p, "You sent " + who.color + who.PublicName + Server.DefaultColor + " to the spawn.");
   }
   else
   {
      Player.SendMessage(p, "Cannot spawn players of greater or equal rank.");
   }
}
else
{
   Player.SendMessage(p, "Player could not be found.");
}


Also within this section of code:
Code: Select all
public override void Help(Player p)
{
   
}


You'll want to add something along the lines of;

Code: Select all
Player.SendMessage(p, "/xspawn [player] - send [player] to the spawn.");


Lastly, make sure you change the details at the top of the command skeleton referring to the command name, its shortcut and more.

Then you can go back to your console and type /compile xspawn. Hopefully you get no compiler error... in which case you can then load your command with /cmdload xspawn.

Add "xspawn" to cmdautoload.txt to ensure it loads on server startup.

I have just made this now and haven't tested it so if anything messes up let me know asap and I can help you out.
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Re: /xspawn

Postby toystory_justin » 26 Feb 2013, 12:25

Got it working. :D
toystory_justin
 
Posts: 224
Joined: 11 Nov 2012, 07:12
Location: On a dark place

Next

Return to Requests for Addon

Who is online

Users browsing this forum: No registered users and 3 guests

cron