06.03.2014, 12:56
Hello,I got a script that any player enter with any admin name he can use all command before writing password ,can I get help plz ?
public OnPlayerConnect(playerid)
{
INI_ParseFile(Userfile(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
//Load the player's password, but this also loads everything else like 'Admin' and 'Money' etc.
ShowPlayerDialog(playerid, ... //Show the login dialog.
return 1;
}
public OnPlayerConnect(playerid)
{
INI_ParseFile(Userfile(playerid), "LoadPassword_%s", .bExtra = true, .extra = playerid);
//Load ONLY the password, in a separate function.
ShowPlayerDialog(playerid, ... //show login dialog
return 1;
}
//When the player logs in:
INI_ParseFile(Userfile(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
//Load the user's entire file once they log in.
public OnPlayerConnect(playerid)
{
INI_ParseFile(Userfile(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
//Load the whole user's file.
PlayerInfo[playerid][Admin] = 0; //Reset the admin level to 0.
ShowPlayerDialog(playerid, ... //Show the login dialog
return 1;
}