Skip to content

Instantly share code, notes, and snippets.

@KaanGaming KaanGaming/Program.cs Secret

Last active Mar 9, 2019
Embed
What would you like to do?
PlayerIO Everybody Edits testing
using System;
using PlayerIOClient;
namespace Gist
{
class Program
{
static Client client;
static Connection con;
static void Main(string[] args)
{
Console.WriteLine("Connecting...");
client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "EMAIL", "PASSWORD", null);
object version = client.BigDB.Load("config", "config")["version"];
con = client.Multiplayer.CreateJoinRoom("WORLDID", "public", true, new Dictionary<string, string>(), new Dictionary<string, string>());
con.Send("init");
con.OnMessage += new MessageReceivedEventHandler(handlemsg);
}
private void handlemsg(object sender, Message m)
{
if (m.Type == "say")
{
if (m.GetString(1) == "!ping")
{
con.Send("pm", m.GetInt(0), "pong");
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.