[Help] Removing Auto-login - 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] Removing Auto-login (
/showthread.php?tid=553531)
[Help] Removing Auto-login -
Arxalan - 30.12.2014
Hello , Following is my OnPlayerConnect Code.This codes allow user to login without giving password . So i want to remove this system . I want that user need to give password every single time he logins even if he login after 10 seconds.
Following is the code . Please edit and send it to me.
PHP код:
if(db_num_rows(Result))
{
//db_get_field_assoc(Result, "IP", storedip, 20);
// db_get_field_assoc(Result, "password", User[playerid][accountPassword], 129);
if((!strcmp(ip, storedip, true)))
{
LoginPlayer(playerid);
LoginPremium(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", ""grey"Welcome back to the server.\nYour account exists on our database, Please insert your account's password below.\n\nTIPS: If you do not own the account, Please /q and use another username.", "Login", "Quit");
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", ""grey"Welcome to the server.\nYour account doesn't exist on our database, Please insert your password below.\n\nTIPS: Make the password long so no one can hack it.", "Register", "Quit");
}
db_free_result(Result);
Following is the enums of accounts data
PHP код:
accountID,
accountName[24],
accountCName,
accountCWait,
accountIP[20],
accountPassword[129],
accountAdmin,
accountKills,
accountDeaths,
accountScore,
accountCash,
accountHelper,