Help Please

Help Please

Postby Breakdown901 » 11 Jul 2013, 10:11

Hey, so I would like to know, what is the method for Player to Player. I thought it was Player.GlobalMessage(p.name + p.color + Server.DefaultColor + "punched p.who");

Is it something like that? As you can guess, I'm going to try making a /punch command.

Also, is the method for a player who is not there

If.who==null
Player.SendMessage("Player is not online");

Please help, I'd appreciate it. Thanks :)
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54

Re: Help Please

Postby joppiesaus » 11 Jul 2013, 10:48

you must define who!
Code: Select all
Player who = Player.Find(message.Split(' ')[0]);


You are correctly about the Player.Globalmessage, except you must add spaces first.

And the second thing too, but there are some syntax errors.
Code: Select all
if (who == null)
{
   Player.SendMessage(p, "Player is not online.");
   return;
}
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!


Return to Help in Coding

Who is online

Users browsing this forum: No registered users and 1 guest