Page 1 of 1

How do i link commands?

PostPosted: 02 May 2014, 18:16
by leicestercity
So basically i want to link a command. If you type /reference (playername) it references them. How would you link it to /myrefs so the players can check whose referenced them and them /references (playername) so other staff can see whose referenced who???

Re: How do i link commands?

PostPosted: 02 May 2014, 18:39
by joppiesaus
So if I get this right(I made a ugly mspaint drawing to visualize it):
slashreference.png
slashreference.png (14.09 KiB) Viewed 817 times

But what's the problem?
Storing it?

Re: How do i link commands?

PostPosted: 02 May 2014, 19:42
by leicestercity
/myrefs - Checks your own references.
/references (playername) - Allows superop+ to check other players references.
/reference (playername) - Allows op+ to reference a player.

It sends a copy of the players references to /references and /myrefs. How do i get it to transfer the actual reference to other commands.

EG: /reference exampleplayer

In the chat it will say "You have reference example player"

When the player types /myrefs it will say
"leicestercity has referenced you"

So when they apply they have references to say that staff think there ready.

And the chosen rank to sort ranks apps can check their references by typing
/references (playername)

It will display:
"leicestercity has referenced you"

How do i get it to transfer the information to a different command???

Re: How do i link commands?

PostPosted: 02 May 2014, 20:01
by Leeizazombie
You could try save text files to save the information.
Using the following reference:
using System.IO;

So in /reference (player)
Do:
File.Create("/extra/" + p.name + "Reference.txt");

So if you referenced me, a file will be created called: "LeeIzaZombie+Reference.txt"

After that, you can add into the /myrefs, a part that checks if that file exists:
if (File.Exists("/extra/" + p.name + "Reference.txt"))
{
Player.SendMessage(p, "You have a reference");
}

This is just a quick example and idea, I don't really have a lot of time, but if you want to make it say who referenced the player, you could add text into the file, and make /myrefs read it.

PS: If you want me to help you make it, I can do so, and leave some notes. Just PM me on the website!