30.12.2014, 09:15
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.
Following is the enums of accounts data
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);
PHP код:
accountID,
accountName[24],
accountCName,
accountCWait,
accountIP[20],
accountPassword[129],
accountAdmin,
accountKills,
accountDeaths,
accountScore,
accountCash,
accountHelper,