02.02.2015, 00:38
i starting my server and its work fine but when i register tell me login i login tell me Server is Restarting and again and crashed how to fixed it?
pawn Код:
#define THREAD_LOGIN 1
pawn Код:
stock LoginLog(string[])
{
LogCallback("LoginLog");
new entry[128];
format(entry, sizeof(entry), "%s\r\n",string);
new File:hFile;
hFile = fopen("LARP/Logs/logins.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
LogCallback("LoginLog");
}
pawn Код:
if(dialogid == 1245)
{
if(response)
{
strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
if(!strcmp(Typed[playerid], "None", true))
{
ShowServerDialog(playerid, 1245, DIALOG_STYLE_PASSWORD,"Try Again, Please Log-In","You didn't type a password!\nType your password below to log-in","Log-in","Quit");
}
else
{
new
sqlQuery[300],
password2 = num_hash(inputtext)
;
actuallyConnected[playerid] = true;
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_users WHERE `Username`='%s' AND `Password`='%d'", GPN(playerid), password2);
mysql_query(sqlQuery, THREAD_LOGIN, playerid);
return 1;
}
}
else
{
ServerKick(playerid);
}
}