Page 1 of 1

Help!!!

PostPosted: 06 May 2014, 17:04
by leicestercity
OK so this area will be used a lot from me as i'm still learning C#. So in /xrules say your first rule was
1. No swearing/foul language. How would make it so when a player type @1 it brings up the rule. I tried it on my own but i came up with
Code: Select all
if ("@1") Player.GlobalMessage ("1. No swearing/foul language!");
I know your thinking that is very wrong and I thought that too but that's the closest i came up with. If its completely different please tell me because i cant really get much further without knowing this.

Re: Help!!!

PostPosted: 06 May 2014, 20:11
by HETAL
You would need to make an extension to the ChatHandler then hook it up using a =+, I would show you an example I use for voting when making minigames, but phones aren't that useful for programming :P

Re: Help!!!

PostPosted: 07 May 2014, 12:51
by Leeizazombie
You could also use custom constants like $r1
You can add these custom constants in the settings file for it in /text/ directory.

Re: Help!!!

PostPosted: 07 May 2014, 17:03
by leicestercity
I dont get it. How do you add the constants, the format is confusing???

Re: Help!!!

PostPosted: 07 Sep 2014, 17:19
by AFK_Games
Its easy, to choose the option/message after the /<cmdname> its just like:

Code: Select all
if (message == "test")
            {
                Player.GlobalMessage("Enter some text here...")
            }

Re: Help!!!

PostPosted: 07 Sep 2014, 18:33
by joppiesaus
AFK_Games wrote:-snip-

You are aware that this thread was from may?

Re: Help!!!

PostPosted: 08 Sep 2014, 17:40
by AFK_Games
I DONT CARE :/