Exemplo n.º 1
0
        public static void FakeLogout(Player p = null)
        {
            string worldId       = RoomManagerBase.currentRoom.id;
            string worldInstance = RoomManagerBase.currentRoom.currentInstanceIdWithTags;
            string userId        = PlayerReflections.GetApiUser(p).id;

            ApiModeration.SendVoteKick(userId, worldId, worldInstance);
        }
Exemplo n.º 2
0
        public void LoadCloneButton()
        {
            void CreateButtons(GameObject go = null)
            {
                Transform parent = GameObject.Find("UserInteractMenu").transform;

                if (PlayerReflections.GetApiAvatar(selectedPlayer).releaseStatus == "public")
                {
                    if (go != null)
                    {
                        cloneButton = GameObject.Instantiate(go, go.transform.position, default(Quaternion), parent);
                    }

                    cloneButton.GetComponent <Button>().colors = Functions.SetThemeColor(cloneButton.GetComponent <Button>().colors);
                    cloneButton.SetActive(true);
                    cloneButton.GetComponentInChildren <Text>().text = "Yoink";
                    //disable persistent button
                    cloneButton.GetComponent <Button>().onClick.SetPersistentListenerState(0, UnityEngine.Events.UnityEventCallState.Off);
                    cloneButton.GetComponent <Button>().onClick.RemoveAllListeners();
                    cloneButton.GetComponent <Button>().onClick.AddListener(delegate()
                    {
                        Exploits.LoadAvatarFromId(PlayerReflections.GetApiAvatar(selectedPlayer).id);
                    });
                    cloneButton.GetComponent <Button>().interactable = true;
                }
                else
                {
                    if (go != null)
                    {
                        cloneButton = GameObject.Instantiate(go, go.transform.position, default(Quaternion), parent);
                    }

                    cloneButton.SetActive(true);
                    cloneButton.GetComponentInChildren <Text>().text = "PRIVATE";
                    cloneButton.GetComponent <Button>().onClick.RemoveAllListeners();
                    cloneButton.GetComponent <Button>().interactable = false;
                }
            }

            if (cloneButton == null)
            {
                CreateButtons(GameObject.Find("UserInteractMenu").transform.Find("ForceLogoutButton").gameObject);
                cloneButton.transform.localPosition = cloneButton.transform.localPosition + new Vector3(840, 0);
            }
            if (cloneButton != null)
            {
                CreateButtons();
            }
        }
Exemplo n.º 3
0
 public static KeyValuePair <object, object> SetShowSocialRank(string rank) => new KeyValuePair <object, object>("showSocialRank", PlayerReflections.GetShowSocialRank());