Register & Login problem
#1

Quote:

public OnPlayerRegister(playerid, password[])
{
//FuncLog("OnPlayerRegister");
if(IsPlayerConnected(playerid))
{
MySQLCheckConnection();
new playername[MAX_PLAYER_NAME];
new playername3[MAX_PLAYER_NAME];
new newpass[64];
GetPlayerName(playerid, playername3, sizeof(playername3));
mysql_real_escape_string(playername3, playername);
mysql_real_escape_string(password, newpass);
new query[128];//PASSWORD
format(query, sizeof(query), "INSERT INTO `userinfo` (UserName) VALUES ('%s');", playername);
mysql_query(query);
new newaccountsqlid = MySQLCheckAccount(playername3);
if (newaccountsqlid != 0)
{
format(query, sizeof(query), "INSERT INTO `uservehicles` (ID, UserName) VALUES (%d, '%s');", newaccountsqlid, playername);
mysql_query(query);
format(query, sizeof(query), "INSERT INTO `userstrings` (ID, UserName, Password) VALUES (%d, '%s', '%s');", newaccountsqlid, playername, newpass);
mysql_query(query);
format(query, sizeof(query), "INSERT INTO `userlocker` (ID, Username) VALUES (%d, '%s');", newaccountsqlid, playername);
mysql_query(query);
PlayerInfo[playerid][pSQLID] = newaccountsqlid;
strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 127);
//SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you can now login.");
//ShowPlayerDialog(playerid, 115, DIALOG_STYLE_INPUT, "{00BFFF}Westcoast Roleplay", "This account is Registered!\nPlease enter your Password!", "Login", "Exit");
gPlayerAccount[playerid] = 1;
OnPlayerLogin(playerid, password);
}
}
return 1;
}

Help, What is the problem? When i Register/Login and when i type my pass, nothing happen
Reply
#2

If you're using a released script, you should post in the release thread. This looks a lot like CW-RP.
Reply
#3

hmm what do you mean Calgon?
Reply
#4

did you make a folder called bla bla registered players or something like that?
Reply
#5

'users' on the scriptfiels?
Reply
#6

Quote:
Originally Posted by Jermi
Посмотреть сообщение
hmm what do you mean Calgon?


Quote:
Originally Posted by [A]ndrei
Посмотреть сообщение
did you make a folder called bla bla registered players or something like that?
Reply
#7

i got it from samp forum
Reply
#8

^^ there is nothing wrong with that, but post THIS question wherever you found this gamemode.
Reply
#9

hey i think i know whats wrong put the register/login system first in server.cfg like this
Код:
filterscripts register/loginsystem script2 script 3 ETC
try that because if im right the dialogs might be interfering each other...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)