Register for your free account! | Forgot your password?

You last visited: Today at 20:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help]VIP System

Discussion on [Help]VIP System within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Weezz's Avatar
 
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);
            }
        }
    }
}
Weezz is offline  
Old 12/14/2008, 21:01   #2
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
lol Nice idea
felipeboladao is offline  
Old 12/14/2008, 21:13   #3
 
Weezz's Avatar
 
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
Weezz is offline  
Old 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" ??
YukiXian is offline  
Old 12/14/2008, 23:21   #5
 
Weezz's Avatar
 
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
File Type: jpg d132E.tmp.jpg (130.2 KB, 44 views)
Weezz is offline  
Old 12/14/2008, 23:51   #6
 
_Emme_'s Avatar
 
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!!");
}
_Emme_ is offline  
Thanks
1 User
Old 12/15/2008, 02:54   #7
 
Weezz's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 58
Received Thanks: 6
Quote:
Originally Posted by EmmeTheCoder View Post
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
Weezz is offline  
Old 12/15/2008, 05:08   #8
 
felipeboladao's Avatar
 
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);
}
}
}
}
felipeboladao is offline  
Old 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.
kinshi88 is offline  
Old 12/15/2008, 05:33   #10
 
felipeboladao's Avatar
 
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
felipeboladao is offline  
Old 12/15/2008, 12:19   #11
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Quote:
Originally Posted by felipeboladao View Post
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,,,
YukiXian is offline  
Old 12/16/2008, 01:07   #12
 
felipeboladao's Avatar
 
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);
            }
        }
    }
}
felipeboladao is offline  
Reply


Similar Threads 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.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.