HELP How can i stop using the normal file system and just use the mySQL data bas
#1

Hello, I have mySQL on my server installed but it still creates the normal *.ini file userdata and I don't want that i just want mySQL!
Please help?
Reply
#2

I think your registration system left with Dini.
Change it to MySQL registration.
Reply
#3

yes i have... its got both lol shall i delete the ini login system?
Reply
#4

Old script.... I've removed the following ing red and below is the script im using now..
Quote:

//-------------------------------[Login]--------------------------------------------------------------------------
if (strcmp(cmd, "/login", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /login [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 1;
}
if (strcmp(cmd, "/register", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "/accounts/%s.ini", sendername);
new File: hFile = fopen(string, io_read)
if (hFile)

{
SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
fclose(hFile);
return 1;
}
new tmppass[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
return 1;
}
//----------------------------------[ooc]-----------------------------------------------

Changed....
Quote:

//-------------------------------[Login]--------------------------------------------------------------------------
if (strcmp(cmd, "/login", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /login [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 1;
}
if (strcmp(cmd, "/register", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
{
SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
return 1;
}
new tmppass[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
return 1;
}
//----------------------------------[ooc]-----------------------------------------------

It compiled really well but I now cant register using the above script. any ideas??
Reply
#5

Well. You must to remove Dini registration and build MySQL registration. I'm too right now studying MySQL. My advice to you - find some a good scripter, who is friendly and learn MySQL and start to script with him. I'm doing like that and it helps.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)