#1

Hello guys, i use JLadmin and when i login my password must be 132198 and when i typed lol it login any help?
Reply
#2

code?
Reply
#3

PHP код:
CMD:login(playerid,params[])
{
    if (
pInfo[playerid][Logged] == 1) return SendClientMessage(playerid,lighterblue,"You are already logged in");
    
format(Jstring128ACCOUNTS_PATHGetName(playerid));
    if(!
fexist(Jstring))
    {
        
SendClientMessage(playerid,red,"Nick name isn't registered!");
        
SendClientMessage(playerid,lighterblue,"Please '/register' to create your account");
        return 
1;
    }
    
format(Jstringsizeof(Jstring),"Account \"%s\"\nPlease enter the password to login"GetName(playerid));
    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"Account Access"Jstring"Login""Quit");
    return 
1;

Dialogs

PHP код:
    if(dialogid == DIALOG_LOGIN)
    {
       if(
response)
       {
              new 
Jfile[100],pIP[16],buf[145];
              new 
joinMsg[128], name[MAX_PLAYER_NAME];
              
GetPlayerName(playeridnamesizeof(name));
              
format(Jfile60ACCOUNTS_PATHGetName(playerid));
              
INI_ParseFile(Jfile"GetPassword", .bExtra true, .extra playerid);
              
WP_Hash(bufsizeof(buf),inputtext);
              if(
strcmp(pInfo[playerid][Password], buffalse) == 0)
              {
                   
format(Jfile100ACCOUNTS_PATHGetName(playerid));
                   
INI_ParseFile(Jfile"LoginPlayer", .bExtra true, .extra playerid);
                   
SendClientMessage(playerid,green,"You have been succesfully logged In!");
                   
SetPlayerScore(playeridpInfo[playerid][Score]);
                   
GivePlayerMoney(playeridpInfo[playerid][Cash]);
                   
pInfo[playerid][Logged] = 1;
                   
GetPlayerIp(playerid,pIP,16);
                   
format(Jfile100ACCOUNTS_PATHGetName(playerid));
                   new 
INI:ACCOUNT INI_Open(Jfile);
                   
INI_WriteString(ACCOUNT"LastLoggedIP"pIP);
                   
INI_Close(ACCOUNT);
                   
#if LoginTextDraw == true
                   
TextDrawHideForPlayer(playeridTEXT_PASSWORD);
                   
TextDrawHideForPlayer(playeridTEXT_REGISTER);
                   
TextDrawHideForPlayer(playeridTEXT_REGISTERED);
                   
CancelSelectTextDraw(playerid);
                   
#endif
                       
format(joinMsgsizeof(joinMsg), "02[%d] 038,2 %s Has Logged In As Level %d"playeridname,pInfo[playerid][pLevel]);
    
IRC_GroupSay(groupIDIRC_CHANNELjoinMsg);
              }
              else
              {
                  
pInfo[playerid][LoginAttempts]++;
                  if(
pInfo[playerid][LoginAttempts] >= MAX_LOGIN_ATTEMPTS)
                  {
                      
format(Jstringsizeof(Jstring),"%s has been automatically kicked | Reason: 'Incorrect password'"GetName(playerid));
                      
SendToAdmins(orange,Jstring);
                      
ShowPlayerDialog(playeridJDIALOGS+45DIALOG_STYLE_MSGBOX"WARRING","You have been automatically kicked | Reason: 'Incorrect password'""Ok""");
                      
SetTimerEx("KickPlayer",100,false,"d",playerid);
                      return 
1;
                  }
                  
format(Jstringsizeof(Jstring),"Account \"%s\"\nEnter your password to login\n{FF0000}*Incorrect password"GetName(playerid));
                  
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Account Login error",Jstring"Login""Quit");
              }
       } 
Reply
#4

Your password isn't being stored correctly, which means your 'GetPassword' function is being used incorrectly. Show us that function.
Reply
#5

PHP код:
public GetPassword(playeridname[], value[])
{
    
INI_String("Password"pInfo[playerid][Password],130);
    return 
1;

Reply
#6

Return the value...
Код:
public GetPassword(playerid, name[], value[])
{
    return INI_String("Password", pInfo[playerid][Password],130);
}
Reply
#7

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Return the value...
Код:
public GetPassword(playerid, name[], value[])
{
    return INI_String("Password", pInfo[playerid][Password],130);
}
INI_String saves the string inside of the destination (pInfo[playerid][Password])
It doesn't return the string.
Reply
#8

Give me errors

PHP код:
public GetPassword(playeridname[], value[])
{
    
INI_String("Password"pInfo[playerid][Password],130);
return 
0;

That could work?
Reply
#9

Quote:
Originally Posted by Stinged
Посмотреть сообщение
INI_String saves the string inside of the destination (pInfo[playerid][Password])
It doesn't return the string.
lol, sorry. I not use ini save.
Reply
#10

Help?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)