[HELP] Password Error = Failed
#1

Description
I made an RolePlay game mode with Admin System in it. After that i made a code that is send the message to player when they enter wrong password, but when i try them it just straight to login .. not giving and error but it just straight to login any idea of it? Note: IM USING Y_INI

Code
pawn Код:
if ( dialogid == iMenu [ 1 ] ) {
    if ( response ) {
        new
            Buf [ MAX_STRINGS ] ,
            iFilePath [ MAX_STRINGS ] ;
        WP_Hash ( Buf , sizeof ( Buf ) , inputtext ) ;
        format ( iFilePath , sizeof ( iFilePath ) , "/EpicZZAdmin/Users/%s.ini" , iName ( playerid ) ) ;
        INI_ParseFile ( iFilePath , "LoginAcc" ,  false, true, playerid, true, false ) ;
        if ( strcmp ( Account [ playerid ] [ Password ] , Buf , false ) == 0 ) {
            if ( fexist ( iFilePath ) ) {
                SetPlayerScore ( playerid , Account [ playerid ] [ Score ] ) ;
                GivePlayerMoney ( playerid , Account [ playerid ] [ Money ] ) ;
                Account [ playerid ] [ Regged ] = 1 ;
                Account [ playerid ] [ Logged ] = 1 ;
            }
        }
        else {
            if ( !strlen ( inputtext ) ) return ShowPlayerDialog ( playerid , iMenu [ 0 ] , DIALOG_STYLE_INPUT , "EpicZZ Roleplay" , "ERROR: Wrong password" , "Submit" , "Exit" ) ;
        }
    }
    else {
        Kick ( playerid ) ;
    }
}
Reply
#2

oh i forgot about the callbacks..

pawn Код:
public LoginValue ( playerid , name [ ] , value [ ] ) {
    if ( strcmp ( name , "Password" , false ) == 0 ) {
        Account [ playerid ] [ Password ] = strval ( value ) ;
    }
    if ( strcmp ( name , "Kills" , false ) == 0 ) {
        Account [ playerid ] [ Kills ] = strval ( value ) ;
    }
    if ( strcmp ( name , "Deaths" , false ) == 0 ) {
        Account [ playerid ] [ Deaths ] = strval ( value ) ;
    }
    if ( strcmp ( name , "Score" , false ) == 0 ) {
        Account [ playerid ] [ Score ] = strval ( value ) ;
    }
    if ( strcmp ( name , "Money" , false ) == 0 ) {
        Account [ playerid ] [ Money ] = strval ( value ) ;
    }
    if ( strcmp ( name , "Level" , false ) == 0 ) {
        Account [ playerid ] [ Level ] = strval ( value ) ;
    }
    if ( strcmp ( name , "VIP" , false ) == 0 ) {
        Account [ playerid ] [ VIP ] = strval ( value ) ;
    }
    return 1;
}
Reply
#3

wow i never though ppl had no idea for solve this..
Reply
#4

LET ME SPELL IT FOR YA " B - U - M - P "
Reply
#5

Quote:
Originally Posted by AK47317
Посмотреть сообщение
wow i never though ppl had no idea for solve this..
I find it unbelievable that people put nearly ZERO effort into fixing their own issues.
Reply
#6

Quote:
Originally Posted by mprofitt
Посмотреть сообщение
I find it unbelievable that people put nearly ZERO effort into fixing their own issues.
really? what if ur script fail same about my script.. what u gonna do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)