Jump to content
Hostul a fost schimbat. Daca vedeti serverul offline readaugati rpg.b-zone.ro sau 141.95.124.78:7777 in clientul de sa-mp ×

[C#] B-Zone Launcher


zL Dark ReturN
 Share

Recommended Posts

 

Am vrut să îl încerc, l-am downloadat si îmi dă o eroare:

Am si off anti-virusul.

E6ODDuO.png

 

 

 

Daca ai Windows 7 pe 64 de biti nu e de mirare. Cei de la Microsoft au o problema cu acest sistem. Totusi incearca sa instalezi NET Framework, versiunea cea mai actuala si incearca dupa. Nu trebuie oprit anti virusul, nu e crack sau mai stiu eu ce.

Edited by Hatake
Link to comment
Share on other sites

Foarte fain launcherul. O sa mai faci versiuni? Incearca sa adaugi si acea 'rotita' sa poti schimba locul de unde sa deschida samp-ul.

+1

Deschide ultimul Sa:Mp instalat. Cred ca e si unic, nu stiu sigur. Ideea e ca n'ai nevoie sa'i schimbi locatia având in vedere ca o ia automat.

Link to comment
Share on other sites

@@Shanker Nebunul, e C#. Program facut in Visual Studio. Sursa:

using B_Zone_Launcher.Properties;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace B_Zone_Launcher
{
    public partial class BzoneLauncher : Form
    {
        public const int WM_NCLBUTTONDOWN = 0xA1;
        public const int HT_CAPTION = 0x2;

        [DllImportAttribute("user32.dll")]
        public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
        [DllImportAttribute("user32.dll")]
        public static extern bool ReleaseCapture();

        public BzoneLauncher()
        {
            InitializeComponent();
            userName.Text = (string)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\SAMP", "PlayerName", null);
            rpg1Pic.ImageLocation = "https://www.game-state.com/89.33.242.95:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
            rpg2Pic.ImageLocation = "https://www.game-state.com/89.33.242.97:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
            rpg3Pic.ImageLocation = "https://www.game-state.com/89.33.242.92:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
            rpg4Pic.ImageLocation = "https://www.game-state.com/89.33.242.96:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
            mixPic.ImageLocation = "https://www.game-state.com/89.33.242.115:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
        }

        private void header_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                ReleaseCapture();
                SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
            }
        }

        private void exit_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void minimize_Click(object sender, EventArgs e)
        {
            WindowState = FormWindowState.Minimized;
        }

        object minimizeOnHover = Resources.ResourceManager.GetObject("minimize_hover");
        object minimizeOutHover = Resources.ResourceManager.GetObject("minimize");
        object exitOnHover = Resources.ResourceManager.GetObject("exit_hover");
        object exitOutHover = Resources.ResourceManager.GetObject("exit");

        private void minimize_MouseEnter(object sender, EventArgs e)
        {
            minimize.Image = (Image)minimizeOnHover;
        }

        private void minimize_MouseLeave(object sender, EventArgs e)
        {
            minimize.Image = (Image)minimizeOutHover;
        }

        private void exit_MouseEnter(object sender, EventArgs e)
        {
            exit.Image = (Image)exitOnHover;
        }

        private void exit_MouseLeave(object sender, EventArgs e)
        {
            exit.Image = (Image)exitOutHover;
        }

        private void connect_Click(object sender, EventArgs e)
        {
            RegistryKey myKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\SAMP", true);
            if (myKey != null)
            {
                myKey.SetValue("PlayerName", userName.Text, RegistryValueKind.String);
            }
            myKey.Close();
            string path = (string)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\SAMP", "gta_sa_exe", null);
            path = path.Replace("gta_sa.exe", "samp.exe");
            ProcessStartInfo startInfo = new ProcessStartInfo(path);
            if (serverChoice.Text == "RPG1 Server")
                startInfo.Arguments = "-c -h89.33.242.95";
            if (serverChoice.Text == "RPG2 Server")
                startInfo.Arguments = "-c -h89.33.242.97";
            if (serverChoice.Text == "RPG3 Server")
                startInfo.Arguments = "-c -h89.33.242.92";
            if (serverChoice.Text == "RPG4 Server")
                startInfo.Arguments = "-c -h89.33.242.96";
            if (serverChoice.Text == "MIX Server")
                startInfo.Arguments = "-c -h89.33.242.115";
            if (serverChoice.Text != "")
                Process.Start(startInfo);
        }

        private void forum_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://forum.b-zone.ro");
        }
    }
}

Daca nu intelegi ceva intreaba si iti explic.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.