Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (
/showthread.php?tid=604891)
Help -
Hellman92 - 11.04.2016
When i login the server crash, mabye you guys are able to help me, thanks in advance!
PHP код:
if(dialogid == 1245)
{
if(response)
{
strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
if(!strcmp(Typed[playerid], "None", true))
{
ShowPlayerDialog(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)
;
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_users WHERE `Username`='%s' AND `Password`='%d'", GPN(playerid), password2);
mysql_query(sqlQuery, THREAD_LOGIN, playerid);
//OnPlayerLogin2(playerid, inputtext);
}
}
else
{
Kick(playerid);
}
}
Re: Help -
DavidGravelli - 11.04.2016
I think this is SA-MP Roleplay Script. Ex HBG
Anyway You have problem in stock onplayerlogin
Re: Help -
Hellman92 - 11.04.2016
i removed the onplayerlogin here is the login
PHP код:
ew
sqlQuery[300],
password2 = num_hash(inputtext)
;
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_users WHERE `Username`='%s' AND `Password`='%d'", GPN(playerid), password2);
mysql_query(sqlQuery, THREAD_LOGIN, playerid);
Re: Help -
DavidGravelli - 11.04.2016
Why you remove it?
You have to add stock OnPlayerLogin.
Re: Help -
N0FeaR - 11.04.2016
Try this
PHP код:
if(dialogid == 1245)
{
if(response)
{
strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
if(!strcmp(Typed[playerid], "None", true))
{
ShowPlayerDialog(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)
;
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_users WHERE `Username`='%s' AND `Password`='%d'", GPN(playerid), password2);
mysql_query(sqlQuery, THREAD_LOGIN);
//OnPlayerLogin2(playerid, inputtext);
}
}
else
{
Kick(playerid);
}
}