It is currently October 20th, 2018, 11:07 am


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: /nick
PostPosted: September 14th, 2011, 7:37 pm 

Joined: June 25th, 2011, 2:02 pm
Posts: 309
Just a quick favour... can I have the /nick code, it'l be soo helpful, thanks in advance

_________________
Bloody_Llama wrote:
Portals are like flavored condoms: an interesting idea, but not something you ever actually want to use in practice.
0_o
Ollieboy wrote:
The taste runs out really quickly, and then your just stuck sucking on a bit of rubber around a banana.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: /nick
PostPosted: September 14th, 2011, 10:07 pm 
fCraft Developer
User avatar

Joined: May 21st, 2011, 10:53 pm
Posts: 1386
There is no /nick command in fCraft any more. 0.600 will have limited ability to change appearance of players' names though. It's not finished/released yet.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: /nick
PostPosted: September 15th, 2011, 5:52 am 

Joined: June 25th, 2011, 2:02 pm
Posts: 309
Ah, what code could I use then?

_________________
Bloody_Llama wrote:
Portals are like flavored condoms: an interesting idea, but not something you ever actually want to use in practice.
0_o
Ollieboy wrote:
The taste runs out really quickly, and then your just stuck sucking on a bit of rubber around a banana.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: /nick
PostPosted: September 15th, 2011, 11:04 pm 
Owner
User avatar

Joined: May 24th, 2011, 12:05 am
Posts: 1301
Location: California, US
Create your own. Or, Use the _dev build like fragmer stated.

_________________
"Words have no power to impress the mind without the exquisite horror of their reality.."
~ Edgar Allan Poe


Top
Offline Profile  
Reply with quote  
 Post subject: Re: /nick
PostPosted: August 28th, 2012, 4:56 pm 

Joined: August 21st, 2011, 6:31 am
Posts: 280
Location: United Kingdom
N-n-necroooo'd

Code:
static readonly CommandDescriptor CdNick = new CommandDescriptor
        {
            Name = "Nick",
            Category = CommandCategory.Maintenance,
            IsConsoleSafe = true,
            Permissions = new[] { Permission.EditPlayerDB },
            Usage = "/Nick PlayerName DisplayedName",
            Help = "&SA shortcut for /Setinfo DisplayedName, it changes a player's displayedName",
            Handler = NickHandler
        };

        static void NickHandler(Player player, Command cmd)
        {
            string targetName = cmd.Next();
            string valName = cmd.NextAll();

            if (targetName == null)
            {
                CdNick.PrintUsage(player);
                return;
            }

            PlayerInfo info = PlayerDB.FindPlayerInfoOrPrintMatches(player, targetName);
            if (info == null) return;
            string oldDisplayedName = info.DisplayedName;
            if (valName.Length == 0) valName = null;
            if (valName == info.DisplayedName)
            {
                if (valName == null)
                {
                    player.Message("Nick: DisplayedName for {0} is not set.",
                                    info.Name);
                }
                else
                {
                    player.Message("Nick: DisplayedName for {0} is already set to \"{1}&S\"",
                                    info.Name,
                                    valName);
                }
                return;
            }
            info.DisplayedName = valName;

            if (oldDisplayedName == null)
            {
                player.Message("Nick: DisplayedName for {0} set to \"{1}&S\"",
                                info.Name,
                                valName);
            }
            else if (valName == null)
            {
                player.Message("Nick: DisplayedName for {0} was reset (was \"{1}&S\")",
                                info.Name,
                                oldDisplayedName);
            }
            else
            {
                player.Message("Nick: DisplayedName for {0} changed from \"{1}&S\" to \"{2}&S\"",
                                info.Name,
                                oldDisplayedName,
                                valName);
            }

_________________
You cannot use certain BBCodes: [img].


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net