// Called when a player chats
public void onPlayerChat(string message)
{
if (message == "/care")
{
// They typed /care so do it directly here
Player.SendMessage(this, "you're using /care");
}
else if(...other things...)
{
// Other things
}
else
{
// Use a real command
Command.all.Find(message.Split(' ')[0].Substring(message.Split(' ')[0].IndexOf('/'))).Use(this, message.Split(' ')[1]);
}
}
Users browsing this forum: No registered users and 1 guest