You last visited: Today at 20:57
Advertisement
[Help]VIP System
Discussion on [Help]VIP System within the CO2 Private Server forum part of the Conquer Online 2 category.
12/14/2008, 20:47
#1
elite*gold: 0
Join Date: Dec 2008
Posts: 58
Received Thanks: 6
[Help]VIP System
First i want u guys to know im just a beginer about c# and stuff...
Second, u will notice that im not so good about english typing >.<
ive coded a LOTF source and made my own custom server
Now im developing a VIP system. i made many things work but theres still something i couldnt code then i came to ask for help.
Definition:i want to make a form connected to db for VIP member login and get the server upgrades and so on.
im working with my friend but we got some troubles with the code
all we need is get the form connected to DB and indentify the ids and passes
theres the coe we made:
Code:
string User = "";
string Pass = "";
MySqlCommand Command = new MySqlCommand("SELECT * From `UserIds` SET `Pass` = '" + Pass + "' WHERE `User` = '" + User + "'", DataBase.NewConnection);
Command.ExecuteNonQuery();
if (textBox1.Text == "" && textBox2.Text == "")
{
MessageBox.Show("logged sucessfully!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
_thread = new Thread(new ParameterizedThreadStart(FormStart));
_thread.Start();
Close();
}
else
{
MessageBox.Show("Usuario ou Senha Esta incorreta!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception E)
{
MessageBox.Show(E.ToString(), "Error , Voce nao consiguiu Logar!!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
}
12/14/2008, 21:01
#2
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
lol Nice idea
12/14/2008, 21:13
#3
elite*gold: 0
Join Date: Dec 2008
Posts: 58
Received Thanks: 6
Yeah the ideia is great but its not working right as i want =/
i hope some one come to help
12/14/2008, 21:17
#4
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
What you mean with that "Definition" and "a form connected to db for VIP member login and get the server upgrades" ??
12/14/2008, 23:21
#5
elite*gold: 0
Join Date: Dec 2008
Posts: 58
Received Thanks: 6
look the pic atached...
i just want that to get the DataBase informations and check if id and pass are corect...
the rest ive fixed
Attached Images
d132E.tmp.jpg
(130.2 KB, 44 views)
12/14/2008, 23:51
#6
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
Make it the easier way;
Console.Write("Database Username : ");
string User = Console.ReadLine();
Console.Write("Database Password : ");
string Pass = Console.ReadLine();
if (User == Database.UserName && Pass == Database.Password)
{
BLABLA
}
else
{
Console.WriteLine("Wrong information!!");
}
12/15/2008, 02:54
#7
elite*gold: 0
Join Date: Dec 2008
Posts: 58
Received Thanks: 6
Quote:
Originally Posted by
EmmeTheCoder
Make it the easier way;
Console.Write("Database Username : ");
string User = Console.ReadLine();
Console.Write("Database Password : ");
string Pass = Console.ReadLine();
if (User == Database.UserName && Pass == Database.Password)
{
BLABLA
}
else
{
Console.WriteLine("Wrong information!!");
}
YAY!! DID WORK !! THKS EMME
note: i might think about it before
12/15/2008, 05:08
#8
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
Help me is my code...
;D
Variables:
string User = " + TextBox1.text + ";
string Pass = " + TextBox1.text + ";
private void button1_Click_1(object sender, EventArgs e)
{
try
{
if (User == "" && Pass == "")
{
MessageBox.Show("Logado com Sucesso!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
_thread = new Thread(new ParameterizedThreadStart(FormStart));
_thread.Start();
Close();
}
else
{
MessageBox.Show("Usuario ou Senha Esta incorreta!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception E)
{
MessageBox.Show(E.ToString(), "Error , Voce nao consiguiu Logar!!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
}
12/15/2008, 05:22
#9
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 912
private void button1_Click_1(object sender, EventArgs e)
{
User = " + TextBox1.text + ";
Pass = " + TextBox1.text + ";
try
{
if (User == "" && Pass == "")
{
MessageBox.Show("Logado com Sucesso!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
_thread = new Thread(new ParameterizedThreadStart(FormStart));
_thread.Start();
Close();
}
else
{
MessageBox.Show("Usuario ou Senha Esta incorreta!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception E)
{
MessageBox.Show(E.ToString(), "Error , Voce nao consiguiu Logar!!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
}
That should fix it.
12/15/2008, 05:33
#10
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
Error 5 The name 'User' does not exist in the current context C:\Documents and Settings\Diego - Servidor\Desktop\Conquer Online\Sparks CO Project\Form1.cs 55 21 COServerProject
Help me ,plx ;D
12/15/2008, 12:19
#11
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Quote:
Originally Posted by
felipeboladao
Error 5 The name 'User' does not exist in the current context C:\Documents and Settings\Diego - Servidor\Desktop\Conquer Online\Sparks CO Project\Form1.cs 55 21 COServerProject
Help me ,plx ;D
Don't be stupid, Make a string of it,,,
12/16/2008, 01:07
#12
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
help me to conect at The Database ...
Code:
private void button1_Click_1(object sender, EventArgs e)
{
User = " + TextBox1.text + ";
Pass = " + TextBox1.text + ";
try
{
User = "";
Pass = "";
MySqlCommand Command = null;
Command = new MySqlCommand("SELECT * FROM `Users` WHERE `User` = '" + Pass + "' WHERE `Pass` = '" + Pass + "'", DataBase.Connection);
Command.ExecuteNonQuery();
if (User == " + User + " && Pass == " + Pass + ")
{
MessageBox.Show("Logado com Sucesso!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
_thread = new Thread(new ParameterizedThreadStart(FormStart));
_thread.Start();
Close();
}
else
{
MessageBox.Show("Usuario ou Senha Esta incorreta!!", "Ready", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception E)
{
MessageBox.Show(E.ToString(), "Error , Voce nao consiguiu Logar!!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
}
Similar Threads
System
06/23/2010 - WarRock - 2 Replies
Hey leute,
kann mir mal bitte jemand den aktuellen system ordner von warrock hoch laden? wäre super =)
thx im vorraus^^
mfg water1:awesome:
+12 system
09/21/2009 - Dekaron Private Server - 8 Replies
hii guys how can i add +12 system to server and 160 armors...tnx
SYSTEM.MRS IN PSF
04/09/2009 - Soldier Front - 3 Replies
E2 UNG LOAD NA DUPLICATE
TO ALL EGAMES /LEVELUP / MY GAME IS DETEC
NA LOAD ..
CGE INGATS NALANG POST KO 2 SASUSUNOD
How to get System.mrs Like how u want?
04/13/2008 - GunZ - 0 Replies
Could anyone help me i wanna build my own hack just for myself alone and i dont know how to get God Mode or prems so could anyone help me????
I do this System.mrs Hacking Since 4 days ago so i need a little Guide for how to make System.mrs like how u want and i really want god mode so if anyone could look at my own hack thnx
All times are GMT +2. The time now is 20:57 .