Old warn command?

Old warn command?

Postby Stuwie » 28 May 2013, 02:51

Before when I ran a server using MCDzienny there was a /warn command now there's not. How come that command isn't 'built it' any more?, Do you have to get it separate, I'm awful with commands :/.
Image
User avatar
Stuwie
 
Posts: 78
Joined: 27 Nov 2011, 23:49

Re: Old warn command?

Postby ismellike » 28 May 2013, 02:55

There are 2 in the custom command section, I don't know which one you want.
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Old warn command?

Postby Stuwie » 29 May 2013, 02:06

/warn (name) (reason) then they just get warned, I found it very helpful :)
Image
User avatar
Stuwie
 
Posts: 78
Joined: 27 Nov 2011, 23:49

Re: Old warn command?

Postby ismellike » 29 May 2013, 02:22

If you havent already found it, here you go.

mcdzienny.cba.pl/viewtopic.php?f=19&t=499

It's the second one (newer version)
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Old warn command?

Postby Stuwie » 02 Jun 2013, 19:21

Not being noobish or anything xD, But where do you put this code?
Image
User avatar
Stuwie
 
Posts: 78
Joined: 27 Nov 2011, 23:49

Re: Old warn command?

Postby ismellike » 02 Jun 2013, 19:30

Here is dzienny's tutorial on how to add a command [Here]
Here is lucas' tutorial [Here]

If you have trouble with those just post the step you are stuck on.
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Old warn command?

Postby Stuwie » 02 Jun 2013, 19:36

Thank you<3!


And thanks for signing up to Venture forums xD
Image
User avatar
Stuwie
 
Posts: 78
Joined: 27 Nov 2011, 23:49

Re: Old warn command?

Postby Stuwie » 02 Jun 2013, 19:46

There's a problem with the warn command, say if I did this /warn stuwie For greifing it will show as ''Stuwie123 warned Stuwie because: for'' But if I did this /warn stuwie for.griefing it will show as ''Stuwie123 warned stuwie because: for.griefing''

It won't allow you to put spaces. And ''mcdzienny'' replyed saying he fixed it :/.
Image
User avatar
Stuwie
 
Posts: 78
Joined: 27 Nov 2011, 23:49

Re: Old warn command?

Postby lucasds12 » 02 Jun 2013, 19:49

Stuwie wrote:There's a problem with the warn command, say if I did this /warn stuwie For greifing it will show as ''Stuwie123 warned Stuwie because: for'' But if I did this /warn stuwie for.griefing it will show as ''Stuwie123 warned stuwie because: for.griefing''

It won't allow you to put spaces. And ''mcdzienny'' replyed saying he fixed it :/.

Are you using PlatinumKiller's /warn command?
-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: Old warn command?

Postby ismellike » 02 Jun 2013, 19:54

Try this one

Code: Select all
using System;

namespace MCDzienny
{
    public class CmdWarn : Command
    {
        public override string name { get { return "warn"; } }

        public override string shortcut { get { return ""; } }

        public override string type { get { return "mod"; } }

        public override bool museumUsable { get { return true; } }

        public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }

        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, "Player not found!");
            }
            {
                Player.GlobalMessage(p.color + p.name + " %ewarned " + who.color + who.name + " %ebecause : &c" +  message.Substring(message.IndexOf(' ') + 1));
                Player.SendMessage(who, "Do it again you may be kicked!");
            }
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "/warn - /warn player reason Warns a player for that reason.");
        }
    }
}


It's the same thing just replaced something

it had message.Split(' ')[1] instead of message.Substring(message.IndexOf(' ') + 1)

p.s. what do you mean by Venture Forums O_O?
Last edited by ismellike on 02 Jun 2013, 19:56, edited 1 time in total.
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Next

Return to General Chat

Who is online

Users browsing this forum: No registered users and 3 guests

cron