/legal

/legal

Postby leicestercity » 08 Mar 2014, 16:39

Spoiler:



If it works then its brilliant for my first command. If not write a comment on how its not working and how to make it work if you know.
Last edited by Leeizazombie on 08 Mar 2014, 22:45, edited 1 time in total.
Reason: Put the code in a code box.
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: /legal

Postby leicestercity » 09 Mar 2014, 00:53

How do I convert it from .txt to .DLL file
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: /legal

Postby Leeizazombie » 09 Mar 2014, 10:55

Well save it as a .cs first, then put it in /extra/commands/source/
Make sure the name looks like: Cmdlegal.cs
Then go to the console and type: /compile legal then do /cmdload legal
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.

Re: /legal

Postby Kill_Bot_UkzZz » 09 Mar 2014, 13:53

I have used /compile, /cmdload and saved it as a .cs as I always do but it says on the console: compilation error /errors/logs/error etc... I don't think it has enough detail in the Custom Command and it must have something missing in the cs file that converts it to a .dll, Thanks - Kill_Bot_UkzZz

Server: AFK Zombie Survival 2014!
My IG Name: Kill_Bot_UkzZz
Rank: Owner

---------------------------------------------------------------------------------------------------------------------------------------------------------
Kill_Bot_UkzZz
 
Posts: 13
Joined: 18 Feb 2014, 13:35

Re: /legal

Postby Leeizazombie » 09 Mar 2014, 17:22

Oh I see, well I will try use my laptop to debug your command and offer help. (my screen is cracked)
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.

Re: /legal

Postby HETAL » 09 Mar 2014, 17:53

Remove
Code: Select all
public Cmdlegal() { }
and it should work <ok>
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10

Re: /legal

Postby leicestercity » 09 Mar 2014, 18:48

here it is hopefully it works :D
Code: Select all
// Created by leicestercity

using System;
using System.IO;
using System.Threading;
     
namespace MCDzienny
{
    public class legal : Command
    {
        public override string name { get { return "legal"; } }
        public override string shortcut { get { return "legal"; } }
        public override string type { get { return "other"; } }
        public override bool museumUsable { get { return false; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
        public override void Use(Player p, string message)
        {
            Player .SendMessage(p, "%4last are legal good luck %2:D");
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/help legal - gives a message out that the last alive are legal ");
        }
    }
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: /legal

Postby leicestercity » 09 Mar 2014, 19:04

How do i make it so when you type it, it sends it to everyone not just yourself?
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: /legal

Postby dzienny » 09 Mar 2014, 19:04

leicestercity wrote:here it is hopefully it works :D


Player .SendMessage <- there should be no space inside,
Also, you probably want to use Player.GlobalMessage("%4last are legal good luck %2:D"); instead of Player.SendMessage.
Code: Select all
Player.SendMessage(p, "Sends a message to one player - defined by "p" variable.");
Player.GlobalMessage("Sends a message to all the players on the server.");
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27

Re: /legal

Postby Kill_Bot_UkzZz » 09 Mar 2014, 19:06

I should imagine it should be something along the lines of:

Spoiler:
Kill_Bot_UkzZz
 
Posts: 13
Joined: 18 Feb 2014, 13:35

Next

Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 6 guests

cron