How do i link commands?

How do i link commands?

Postby leicestercity » 02 May 2014, 18:16

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???
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: How do i link commands?

Postby joppiesaus » 02 May 2014, 18:39

So if I get this right(I made a ugly mspaint drawing to visualize it):
slashreference.png
slashreference.png (14.09 KiB) Viewed 740 times

But what's the problem?
Storing it?
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: How do i link commands?

Postby leicestercity » 02 May 2014, 19:42

/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???
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: How do i link commands?

Postby Leeizazombie » 02 May 2014, 20:01

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!
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.


Return to Help in Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron