Mysql + PVar
#3

pawn Код:
if( dialogid == 1 )
    {
        if( response )
        {
            new
                query[ 128 ],
                str[ 50 ];
               
               
            format( query, sizeof( query ), "SELECT `Slaptazodis`, `Patirtis`, `Admin` FROM `zaidejai` WHERE `id` = %d", GetPVarInt( playerid, "sqlidas" ) );
            mysql_query( query );
            mysql_store_result();
            mysql_fetch_row( query );
           
            mysql_fetch_field_row( str, "Slaptazodis" );
           
            if ( !strcmp(str, inputtext, true) )
            {
                mysql_fetch_field_row( str, "Patirtis" );
                new
                    exp = strval( str );

                mysql_fetch_field_row( str, "Admin" );
                SetPVarInt( playerid, "Adminas", strval( str ) );


                if(exp == -1) SetPVarInt( playerid, "Authstate", 1 ); else
                SetPVarInt( playerid, "Authstate", 2 );
               
                mysql_free_result();
                return 1;
            }
            ShowPlayerDialog( playerid, 1, DIALOG_STYLE_INPUT, "Serverio prisijungimas.", "Prasome prisijungti", "Prisijungti", "Atsaukti");
            return 1;
        }
       
        if( !response )
        {
            ShowPlayerDialog( playerid, 0, DIALOG_STYLE_MSGBOX, "Tikimes sulaukti jusu sugryztant" );
            Kick( playerid );
    }
Reply


Messages In This Thread
Mysql + PVar - by Axuj - 03.12.2010, 18:48
Re: Mysql + PVar - by Zamaroht - 03.12.2010, 18:50
Re: Mysql + PVar - by Axuj - 03.12.2010, 18:54
Re: Mysql + PVar - by ReVo_ - 03.12.2010, 18:55
Re: Mysql + PVar - by Axuj - 03.12.2010, 18:57
Re: Mysql + PVar - by Zamaroht - 03.12.2010, 19:25
Re: Mysql + PVar - by Axuj - 03.12.2010, 19:31
Re: Mysql + PVar - by Zamaroht - 03.12.2010, 19:41
Re: Mysql + PVar - by Axuj - 03.12.2010, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)