10.07.2015, 13:22
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", ""); }