Not in use Posted December 23, 2016 Share Posted December 23, 2016 Salut de curant am inceput sa invat c#, am reusit sa ma conectez la mysql, sa citesc un tabel si cele ce tin de mysql in c#, iar acum vreau sa invat cum pot adauga api pentru samp nu prea inteleg cum... si cum fac sa trimit un mesaj(samp) pe chat folosind c#? Multumesc. Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 29, 2016 Share Posted December 29, 2016 Arunca o privirie aici: https://www.interactivebrokers.com/en/software/api/apiguide/csharp/csharptutorial_adddllreference.htm Link to comment Share on other sites More sharing options...
Not in use Posted December 29, 2016 Author Share Posted December 29, 2016 @@Hatake,hmm.... http://imgur.com/a/8ld1Vde ce imi da asta... ? Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 29, 2016 Share Posted December 29, 2016 @@Hatake,hmm.... http://imgur.com/a/8ld1Vde ce imi da asta... ? Banuiesc ca nu e bun .dll! Link to comment Share on other sites More sharing options...
Not in use Posted December 29, 2016 Author Share Posted December 29, 2016 Banuiesc ca nu e bun .dll! hmm, deci m-ai putea ajuta cu .dll ul bun de la samp api? Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 29, 2016 Share Posted December 29, 2016 @@Duraxel, cauta la creatii la sugestii cred. Find binder sau heal binder. Link to comment Share on other sites More sharing options...
Not in use Posted December 29, 2016 Author Share Posted December 29, 2016 @@Hatake,bun, am gasit alt api, si functioneaza, dar cand apas pe buton face ce trebuie dar cand trimite mesaj catre chat nu mai pot folosi nici-o comanda... cum pot face ca sa mai pot folosi celelalte comenzi? Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 29, 2016 Share Posted December 29, 2016 @@Duraxel, e problema din cod cred, nu stiu la ce te referi. Link to comment Share on other sites More sharing options...
Not in use Posted December 29, 2016 Author Share Posted December 29, 2016 (edited) deci sln e asta: http://www.girlshare.ro/3489652204.5 imi poti spune ce este gresit de nu mai ma lasa sa scriu alta comanda in chat? @@Hatake, Edited December 29, 2016 by Duraxel Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 29, 2016 Share Posted December 29, 2016 deci sln e asta: http://www.girlshare.ro/3489652204.5 imi poti spune ce este gresit de nu mai ma lasa sa scriu alta comanda in chat? @@Hatake, Da'mi codul, nu .sln. Copy paste Link to comment Share on other sites More sharing options...
Not in use Posted December 29, 2016 Author Share Posted December 29, 2016 Da'mi codul, nu .sln. Copy paste 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 } Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 29, 2016 Share Posted December 29, 2016 (edited) 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 } Ce mesaj încerci sa trimiti mai exact? Edited December 29, 2016 by Hatake Link to comment Share on other sites More sharing options...
Not in use Posted December 29, 2016 Author Share Posted December 29, 2016 (edited) @@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 December 29, 2016 by Duraxel Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 29, 2016 Share Posted December 29, 2016 Pai ce zice serverul? Comanda nu exista, sau? Poti scrie ceva măcar? Link to comment Share on other sites More sharing options...
Not in use Posted December 29, 2016 Author Share Posted December 29, 2016 Pai ce zice serverul? Comanda nu exista, sau? Poti scrie ceva măcar? merge sa zic pe chat, dar daca vreau sa zic ceva pe /f, sau sa execut orice comanda ce incepe cu " / " nu functioneaza, nu imi da nici-un callback, nimic Link to comment Share on other sites More sharing options...
zL Dark ReturN Posted December 31, 2016 Share Posted December 31, 2016 @@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 More sharing options...
Recommended Posts