Jump to content

Problema API


Not in use
 Share

Recommended Posts

@@Hatake,incerc sa trimit cam ce scrie in textBox1

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SampAPI;
 
namespace WindowsFormsApplication6
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            Chat.Send(textBox1.Text); //dupa ce trimite mesajul nu mai poti folosi nici-o comanda a serverului
            
        }
 
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            label1.Text = "Text: " + textBox1.Text + "";
        }
    }
}
 
... si cand vreau sa scriu dupa o comanda de la server in game nu mai merge pana nu dau relog

 

Edited by Duraxel
Link to comment
Share on other sites

@@Duraxel, asta e codul de la find binder, nu stiu de ce tie nu iti merge. Mai mult de atat nu te pot ajuta.

using Find_Binder_v1.Properties;
using shadowAPI2;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Find_Binder_v1
{
    public partial class autoFinder : 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 autoFinder()
        {
            InitializeComponent();
            status.ForeColor = Color.Red;
        }

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

        private void timer1_Tick(object sender, EventArgs e)
        {
            uint local_counter = 0;
            string name = RemotePlayer.GetPlayerNameById(local_counter);
            while (String.IsNullOrEmpty(name))
            {
                name = RemotePlayer.GetPlayerNameById(++local_counter);
            }
            Chat.AddMessage("{f5f21c}[{6699FF}VESCA{f5f21c}] Automatic find binder [v1.0] found player {00FF00}" + name + "{f5f21c}.");
            Chat.Send("/find " + local_counter);
        }

        private void stop_Click(object sender, EventArgs e)
        {
            status.Text = "The binder is OFF";
            status.ForeColor = Color.Red;
            timer1.Enabled = false;
        }

        private void start_Click(object sender, EventArgs e)
        {
            status.Text = "The binder is ON";
            status.ForeColor = Color.Green;
            uint local_counter = 0;
            string name = RemotePlayer.GetPlayerNameById(local_counter);
            while (String.IsNullOrEmpty(name))
            {
                name = RemotePlayer.GetPlayerNameById(++local_counter);
            }
            Chat.AddMessage("{f5f21c}[{6699FF}VESCA{f5f21c}] Automatic find binder [v1.0] found player {00FF00}" + name + "{f5f21c}.");
            Chat.Send("/find " + local_counter);
            timer1.Interval = 125000;
            timer1.Enabled = true;
        }

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

        private void exit_MouseEnter(object sender, EventArgs e)
        {
            exit.Image = (Image)Resources.ResourceManager.GetObject("exit_hover");
        }

        private void exit_MouseLeave(object sender, EventArgs e)
        {
            exit.Image = (Image)Resources.ResourceManager.GetObject("exit");
        }

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

        private void minimize_MouseEnter(object sender, EventArgs e)
        {
            minimize.Image = (Image)Resources.ResourceManager.GetObject("minimize_hover");
        }

        private void minimize_MouseLeave(object sender, EventArgs e)
        {
            minimize.Image = (Image)Resources.ResourceManager.GetObject("minimize");
        }
    }
}

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.