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 ) ;
}
}
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;
}
I find it unbelievable that people put nearly ZERO effort into fixing their own issues.
|