forward OnPlayerLogin(playerid,autolog,password[]);
public OnPlayerLogin(playerid,autolog,password[])
{
new s1[128],file[128],pname[MAX_PLAYER_NAME],levelstr[128];
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerIp(playerid,PlayerInfo[playerid][IP],100);
format(file,sizeof(file),"Accounts/%s.ini",pname);
if(PlayerInfo[playerid][logged]==1) { return SendClientMessage(playerid,rot,"[Server]: You are already Logged!"); }
if(dini_Exists(file))
{
if(strcmp(password,dini_Get(file,"password"),true) == 1)
{
LogAttempts[playerid]++;
format(s1,sizeof(s1),"Login Attempts (%d/3)",LogAttempts[playerid]);
ShowPlayerDialog(playerid,DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ""embhellgrьn"Team-German-Fighters "embgelb"Login-System",s1, "Login", "");
return SendClientMessage(playerid,rot,"[Server]: Wrong Password. Please try it again.");
}
//if password was right do something here......
PlayerInfo[playerid][logged]=1;
}
return 1;
}
|
Do you speak romanian? Esti Hunter pe care il cunosc?
There is no problem with the code, did you put the same password to both accounts? try making a new account with other name than hunter - no clantags try updating your include files and your plugins I think i was Helpfull. ![]() |
. All includes and plugins in the last known version. Its only working to similar names this way. I just dont hope that this will be a security hole and someone with a similar name to an administrator account suddenly will get admin powers.