- Code: Select all
public override void UserJoined(Player player) {
// this is how you send a player a message
//Send info about all already connected users to the newly joined users chat
Message m = Message.Create("ChatInit");
//BigDB.Load("PlayerObjects",player.Id,);
m.Add(player.Id);
foreach (Player p in Players)
{
m.Add(p.Id, p.ConnectUserId);
}
player.Send(m);
//Informs other users chats that a new user just joined.
Broadcast("ChatJoin", player.Id, player.ConnectUserId);
}
I tried to use the .PlayerObject.GetString(<valuehere>) function but I don't think it work. Any help would be appreciated.