About RustBuster and Fougerite

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
3,983
1,469
113
At your house.
github.com
Code similar to the one you used - ...

C#:
    public class TitlePluginGUI : MonoBehaviour
    {
        //DRETAX CODE
        float deltaTime = 0.0f;
        void Update()
        {
            deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
        }
        //FIN

        public void OnGUI()
        {

            GUI.contentColor = Color.blue;
            // GUI.Box(new Rect(5, 5, 275, 25), "RaidersLand 108.61.97.7:28016");
            //DontWORK GUI.Box(new Rect(20, 20, 275, 25), World.GetWorld().Time.ToString());

            //DRETAX CODE
            int w = Screen.width, h = Screen.height;
            GUIStyle style = new GUIStyle();
            Rect rect = new Rect(0, 0, w, h * 2 / 100);
            style.alignment = TextAnchor.UpperCenter;
            style.fontSize = h * 2 / 100;
            //style.normal.textColor = new Color (0.0f, 0.0f, 0.5f, 1.0f);   
            float msec = deltaTime * 1000.0f;
            float fps = 1.0f / deltaTime;
            //string text = string.Format("{0:0.0} ms ({1:0.} fps) ", msec, fps);
            string text = string.Format("RaidersLand 108.61.97.7:28016 ({1:0.} fps) ", msec, fps);
            GUI.Label(rect, text, style);
            // FIN DRETAX CODE       
        }

    }
You are destroying the GUI at deinitialize right?
 

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
576
207
43
You are destroying the GUI at deinitialize right?
Yes!
C#:
  public override void DeInitialize()
        {
            // DeInitialize gets called on disconnect, be sure to cleanup the user's client.
            if (Load != null) UnityEngine.Object.Destroy(Load);
        }

        public override void Initialize()
        {
            if (this.IsConnectedToAServer)
            {
                Load = new GameObject();
                test = Load.AddComponent<TitlePluginGUI>();
                UnityEngine.Object.DontDestroyOnLoad(Load);
                UnityEngine.Debug.Log("Loaded!");
            }
           
        }
 

Mongolas

New Member
Member
Feb 14, 2017
1
0
1
18
I Don't know, if it's possible add Ak-47 , and maybe create a plugin with animals, i mean like that u can have your own animal, like wolf , bear , or mutant bear.
Tu blet realybe jauti? Tau cia ne ARK....Tik serverius apkrautu daugiau nieko tavo tas supistas pluginas....Jei nieko nenusimanai patylek bek i youtube ir ziurek kaip ARK zaidzia,ji i teisma gali paduoti del perkurimo zaidimo...
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
3,983
1,469
113
At your house.
github.com
C#:
// Local player
var player = PlayerClient.GetLocalPlayer();

// Find everyone else
public List<Character> GetPlayerList()
{
    List<Character> list = new List<Character>();
    var PlayerOBJs = Object.FindObjectsOfType<Player>();
    foreach (Object obj2 in PlayerOBJs)
    {
        if (obj2 != null)
        {
            Player player = (Player) obj2;
            if (((player.gameObject != LocalCharacter.gameObject) && (player.playerClient != null)) && (player.alive && !player.dead))
            {
                list.Add(player.character);
            }
        }
    }
    return list;
}