#1

This is the login system placed under "OnPlayerConnect",but the problem is that it loads the player data before logging in,so other players can hack an account easily.

Код:
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
    	format(str1, 150, "{FFFFFF}Welcome back to FreeRoam Server\n\n{00FF00}Account:{FFFFFF} %s \n\nPlease Enter Your Password Below", name);
       	ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login Account", str1, "Login", "");
    }
    else
    {
        format(str1, 150, "\nWelcome To FreeRoam Server\n\n{00FF00}Account Name:{FFFFFF} %s\n\nEnter A Password To Register This Account", name);
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registration", str1, "Register", "");
	}
Reply
#2

Please anyone help
Reply
#3

anyone?
Reply
#4

Код:
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
Remove this above login dialog
and place it under

OnDialogRespose.....

Like
Код:
public OnDialogResponse(playerid.......)
{
if(dialogid ==  .....)
{
if(password OK)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
}
else
{
ShowPlayerDialog(playerid,LOGIN DIALOG.....)(;
Reply
#5

i already tested it,it dident worked because the script cant detect the password if the file is not loaded,any other way?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)