Register again after logout !
#1

If I logout from the server and i want to play again I need to register again.
Reply
#2

We cannot help you since you're not providing any code.
Reply
#3

What code do you need ?
Reply
#4

Help !
Reply
#5

The code to login and register..
Reply
#6

Also did you create the right folders? remember PAWN is case-sensitive!
Reply
#7

K bro !


if (strcmp(cmd, "/login", true) ==0 || strcmp(cmd, "/l", true) ==0)
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "USAGE: (/l)ogin [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), "users/%s.ini", sendername);
//new File: hFile = fopen(string, io_read);
if (fexist(string))
{
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;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You are not login yet!");
SendClientMessage(playerid, COLOR_WHITE, "Hint: Use /Login <password>");
return 1;
}




Yes dude i create the right folder ...
Reply
#8

Its very important please help guys !
Reply
#9

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
Also did you create the right folders? remember PAWN is case-sensitive!
i guess you not have any map to save the accounts, or the register does not create the userfile in the map
Reply
#10

how can i fix it bro ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)