private void GetMessage(BasePlayer player) { string hit = currentHits[player.userID].msg; float distance = currentHits[player.userID].distance; TPUI.GetPlayer(player).UseUI(fontColor2 + hit + "</color> " + fontColor1 + distance + "M</color>"); currentHits[player.userID].time = false; }
private void DestroyNotification(BasePlayer player, string msgNum, int slot) { bool t = CuiHelper.DestroyUi(player, msgNum); if (!t) { DestroyNotification(player, msgNum, slot); } TPUI.GetPlayer(player).slots.Remove(slot); }
public static TPUI GetPlayer(BasePlayer player) { TPUI p = player.GetComponent <TPUI>(); if (p == null) { p = player.gameObject.AddComponent <TPUI>(); } return(p); }