Log In Client made for Game

Hello, I am looking for someone who is able to make a Game Client Log in that will be able to run the game after the user has been authorized. I would also like it to have a sign up feature directly on the client and also a serial number authorization. This is so when they purchase the game they get a serial key.

CONTACT DETAIL.
Email: MrHappyCamperz98@gmail.com

When you contact me we can talk about the GUI and extra stuff.

CLIENT MUST HAVE A BUILT IN LOG IN AND BE CONNECTED TO A DATABASE

Last edited on
Hello HappyCampers, I have just finished a username/password login that might set a base for what you are trying to do. I used a text file for saving usernames/passwords, and I do not know how I would set up a data base communicating to several computers. I myself am relatively new to C++, but I will be willing to help you. Here is the program:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#include <iostream>
#include <sstream>
#include <conio.h>
#include <ctime>
#include <windows.h>
#include <fstream>
#include <string>

using namespace std;

string usernameset()
{
        char ch = getch();
        string username = "";
        while(ch != '\r')
        {
            cout << ch;
            username += ch;
            ch = getch();
    }
    cout << endl;
    return username;
}

string passwordset()
{
     char ch = getch();
    string password = "";
    while(ch != '\r')
    {
        cout << '*';
        password += ch;
        ch = getch();
    }
    cout << endl;
    return password;
}

void regster()
{
    ofstream myfile;
    string username;
    string password;
    string response, tmp;
        cout << "Enter a username and password." << endl;
        cout << "Username: ";
        myfile.open ("usernamepassword.txt", ios::app);
        myfile << response;
        username = usernameset();
        response += username += "\n";
        cout << "Password: ";
        password = passwordset();
        response += password += "\n";
        myfile << response;
        myfile.close();
        cout << "Thanks for registering"
        Sleep(3000)
}

int login()
{
         string search;
         cout << "Please enter your username.\nUsername: ";
         string usernamein;
         cin >> usernamein;
         cout << "Please enter your password.\nPassword: ";
         string passwordin;
         char ch = getch();
         passwordin = "";
         while(ch != '\r')
         {
            cout << '*';
            passwordin += ch;
            ch = getch();
         }
         cout << endl;
         search = usernamein;
         int offset;
         string blob;
         int count; 
         string line;
         ifstream Myfile;
         Myfile.open ("usernamepassword.txt");
         if(Myfile.is_open())
         {
          	while(getline(Myfile,line))
        	{
        	count++;
        		
                if(search == line)
        		{
        		int index = count+1;
        			if(count = index)
        			{
        			getline(Myfile,line);
                    blob = line;
        			}
        			
        		}
          
        	}
             Myfile.close();
         }
         else
         {
         cout<<"Unable to open this file."<<endl;
        system("PAUSE");
        return 0;
        }
         if(blob == passwordin)
         {
                cout << "Congradulations you are not a failure!!";
         }
         else
         {
             cout << "Error!!!";
         }
         system("PAUSE");
         return 0;
}

int main()
{
    bool neworguest;
    string input;
    cout << "Are you a guest, or have you logged in before.\nGuest or User: ";
    cin >> input;
    if(input == "Guest")
    {
         regster();
    }
    else if(input == "User")
    {
         login();
    }
    else
    {
        cout << "Please enter 'Guest' or 'User'";
        Sleep(3000)
        return 0;
    }
        return 0;
}
Thanks for the code, but I can't use it because it must be connected to a Database and also have a built in Signup area
You can use Log Me In Hamachi to connect to other computers.
Topic archived. No new replies allowed.