03.12.2010, 18:54
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 );
}