03.04.2011, 08:50
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
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 ) ;
}
}