-
-
Save KaanGaming/02f4f4f9bda56dc016e074a2cd2805ea to your computer and use it in GitHub Desktop.
PlayerIO Everybody Edits testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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