Help!!!

Help!!!

Postby leicestercity » 06 May 2014, 17:04

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.
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: Help!!!

Postby HETAL » 06 May 2014, 20:11

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
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10

Re: Help!!!

Postby Leeizazombie » 07 May 2014, 12:51

You could also use custom constants like $r1
You can add these custom constants in the settings file for it in /text/ directory.
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: Help!!!

Postby leicestercity » 07 May 2014, 17:03

I dont get it. How do you add the constants, the format is confusing???
LEICESTER TILL I DIE
leicestercity
 
Posts: 33
Joined: 08 Mar 2014, 16:36

Re: Help!!!

Postby AFK_Games » 07 Sep 2014, 17:19

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...")
            }
AFK_Games
 
Posts: 21
Joined: 11 Apr 2014, 21:19

Re: Help!!!

Postby joppiesaus » 07 Sep 2014, 18:33

AFK_Games wrote:-snip-

You are aware that this thread was from may?
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: Help!!!

Postby AFK_Games » 08 Sep 2014, 17:40

I DONT CARE :/
AFK_Games
 
Posts: 21
Joined: 11 Apr 2014, 21:19


Return to Help in Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron