private void SetOnline(object sender, EventArgs e)
        {
            // Oyundan disconnect olmuş mu kontrol et, disconnect olmamışsa son girişi güncelle
            Task.Run(() => LauncherAPIManager.GetStatus(ServerCheckURL, _steamHex)).ContinueWith(getTask =>
            {
                var status = getTask.Result;

                if (string.IsNullOrEmpty(status))
                {
                    return;
                }

                if (status == "-4")
                {
                    FivemManager.KillFivem();
                }
                else
                {
                    var task = LauncherAPIManager.SetStatus(ServerUpdateURL, _steamHex, status);
                }
            });
        }
Exemple #2
0
        private void SetOnline(object sender, EventArgs e)
        {
            // Oyundan disconnect olmuş mu kontrol et, disconnect olmamışsa son girişi güncelle
            Task.Run(() => LauncherAPIManager.GetStatus($"{ServerURL}{StatusCheckEndpoint}", _steamHex)).ContinueWith(getTask =>
            {
                var status = getTask.Result;

                if (string.IsNullOrEmpty(status))
                {
                    return;
                }

                if (status == "-4")
                {
                    FivemManager.KillFivem();
                    FivemStopped();
                }
                else
                {
                    // ReSharper disable once UnusedVariable
                    var task = LauncherAPIManager.SetStatus($"{ServerURL}{StatusUpdateEndpoint}", _steamHex, status);
                }
            });
        }