Now, I got it like this:
PHP Code:
new id = Data[0]
new flags[32], output[1024]
if ( SQL_NumResults(Query) )
{
while( SQL_MoreResults( Query ) )
{
new qcolAccess = SQL_FieldNameToNum( Query, "access" )
SQL_ReadResult( Query, qcolAccess, flags, 31 )
add( output, sizeof(output), flags, sizeof(flags) )
SQL_NextRow(Query)
}
}
SQL_FreeHandle(g_SqlTuple)
set_task( 0.2, "set_flags", id, output, sizeof(output) );
return PLUGIN_CONTINUE
}
public set_flags( const flags[], id )
{
set_user_flags( id, read_flags( flags ) )
log_amx( "Set flags: %s to player: #%d", flags, id )
}
But it still don't set access flags :/ I have logged in console "Set flags: t to player: #1" so it should work...