/headtext (message) |#CPE|

/headtext (message) |#CPE|

Postby Leeizazombie » 06 Apr 2014, 03:56

Hey guys, just got into the new update and made a quick command to use :)

Screenshot:
Image

Syntax: /headtext (message)
Shortcut: /ht (message)

It displays and announcement text on all CPE up to date players.

Code:
Code: Select all
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;

namespace MCDzienny
{
    public class CmdHeadText: Command
    {
        public override string name { get { return "headtext"; } }
        public override string shortcut { get { return "ht"; } }
        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.players.ForEachSync(pl =>
            {
                if (pl.Cpe.MessageTypes == 1)
                {
                    pl.SendMessage(Cpe.V1.Announcement, message);
                    return;
                }
                else
                {
                    // Player.SendMessage(p, "Player's client does not support.");
                }
            });
           
        }
       
        public override void Help(Player p)
        {
            Player.SendMessage(p, "/headtext - Show CPE announcement.");
        }
    }
}


Make sure your server is up to date, and also your ClassiCube client, I believe the Web Client doesn't support it yet
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: /headtext (message) |#CPE|

Postby Alshima » 06 Apr 2014, 04:03

Great command! :D
Alshima
 
Posts: 160
Joined: 11 Mar 2013, 02:22
Location: Alshima Island

Re: /headtext (message) |#CPE|

Postby Leeizazombie » 06 Apr 2014, 04:07

Thanks. :!:
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 Custom Commands

Who is online

Users browsing this forum: No registered users and 3 guests